gcook17
asked on
VB.Net 2005 Cannot Login With SQLAuthentication
I have a VB.net windows forms application that is a front-end to a SQL Server databse. Using ado.net 2.0 I am able to login to the database with Windows Authentication no problem. However, when attempting to use SQL Authentication the log in fails with the following message: "Login failed for user 'dan'. The user is not associated with a trusted SQL Server connection"
Here is the connection string being used for SQL Authentication (fails): "Provider=SQLOLEDB;Server= SERVER2006 \SQLEXPRES S;Database =TestDB;Ui d=dan; Pwd=1111" I must be able to use SQL Authentication for security reasons. Please help with this problem. Thank you.
BTW:Here is the database connectioon string that works in Windows Authentication (succeeds): "Provider=SQLOLEDB;Integra ted Security=SSPI;Persist Security Info=False;Initial Catalog=TestDB;Data Source=SERVER2006\SQLEXPRE SS"
Here is the connection string being used for SQL Authentication (fails): "Provider=SQLOLEDB;Server=
BTW:Here is the database connectioon string that works in Windows Authentication (succeeds): "Provider=SQLOLEDB;Integra
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
One more comment. The above connection string actually should say "User ID" (instead of Uid) and "Password" (instead of Pwd). I believ this does make a difference.
"ADOConnectionString" value="Provider=SQLOLEDB;P ersist Security Info=False;Initial Catalog=Database;Data Source=SERVER2006\SQLEXPRE SS;User ID=dan;Password=1111"
"ADOConnectionString" value="Provider=SQLOLEDB;P
ASKER