Link to home
Start Free TrialLog in
Avatar of focusmicro
focusmicro

asked on

Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' --- [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connect

I used the follow string connections:
strConnect = "Driver={SQL Server}; Persist Security Info=False; Server=SERVER NAME; Database=DB NAME; Trusted_Connection=Yes;"
AND
strConnect = "Driver={SQL Server}; Server=SERVER NAME; Database=DB NAME; UID=; PWD=;"
The ERROR was:  
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

When I used this string connection:
strConnect = "Provider=SQLOLEDB; Initial Catalog=DB NAME; Source=SERVER NAME; Integrated Security=Yes;"
The ERROR was:
Provider error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

And with this string connection:
'strConnect = "Provider=SQLOLEDB;  Server=DB NAME; Database=DB NAME; Trusted_Connection=Yes;"
The ERROR was:
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I could not find a solution that help me with these string connections. I f you have some ideas about these problems, I will apreciate your advices
ASKER CERTIFIED SOLUTION
Avatar of srafi78
srafi78
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@focusmicro....

Its not a connectingstring problem but an authentication issue as specified by @kevp75 earlier...

Try using sql server authentication rather than windows authentication for sql server. Change the authentication settings to Mixed authentication mode under security tab in the sql server properties.


Take a look at the below mentioned sites which shall help you....

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q307/0/02.asp&NoWebContent=1
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q269587