Connectionstring to SQL Server on Local Server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I am attempting to connect to SQL Server 2000 on my local server, I get the following error:

"Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection"

My connection string is as follows:

string strCnn = "server=fredflintstone;uid=sa;pwd='';database=DBPass"

For my SQL Server account I am using Local Windows Authentication, so I don't have a password. I also tried using server=local as well as different uid's. All have the same result. Should I set up SQL Server 2000 to use a different userID and password instead of window's authentication? If I do, is the connection string going to be similar?

Thanks for any input on the subject.

BGuy
 
I would bet that you only have Windows Authentication
turned on for your SQL Server Service. Either try the
Integrated Security=SSPI in your connection string or
reconfigure your security on the SQL Server Service.
-----Original Message-----
When I am attempting to connect to SQL Server 2000 on my
local server, I get the following error:
"Login failed for user 'sa'. Reason: Not associated with
a trusted SQL Server connection"
My connection string is as follows:

string strCnn
= "server=fredflintstone;uid=sa;pwd='';database=DBPass"
For my SQL Server account I am using Local Windows
Authentication, so I don't have a password. I also tried
using server=local as well as different uid's. All have
the same result. Should I set up SQL Server 2000 to use a
different userID and password instead of window's
authentication? If I do, is the connection string going
to be similar?
 
Back
Top