Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not associated with a trusted SQL Server connection. HELP

Status
Not open for further replies.

choohean

Technical User
Jan 15, 2002
57
0
0
MY
I'm using SQL server 2000 and Windows XP! I facing this problem when I try to connect to my database!

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

Is it any error in my code?

conn.Open "Provider=sqloledb; Data Source=(Local); Initial Catalog=FMS; User ID=sa; Password=;"

 
try this:
conn.Open "Provider=sqloledb; Data Source=TheSystemIPAddress[\b]; Initial Catalog=FMS; User ID=sa; Password=;PersistSecurityInfo=False"
is there a username and password?

Known is handfull, Unknown is worldfull
 
This is probably because SQL Server is set to Windows Authentication rather than Mixed Mode Authentication. You need to use Mixed Mode to be able to log in with a user name and password such as sa.

Also, it is very bad practice to leave the sa password blank! If you do change to Mixed Mode I suggest you create a strong password for the sa account.

--James
 
thanks for your advice! It already help me solve the problem!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top