Solved

VB.Net 2005 Cannot Login With SQLAuthentication

Posted on 2011-02-11
3
264 Views
Last Modified: 2012-05-11
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\SQLEXPRESS;Database=TestDB;Uid=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;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TestDB;Data Source=SERVER2006\SQLEXPRESS"
0
Comment
Question by:gcook17
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 34874538
Change the authentication mode to mixed mode

http://support.microsoft.com/kb/555332
0
 

Author Closing Comment

by:gcook17
ID: 34874661
Thanks
0
 

Author Comment

by:gcook17
ID: 34874783
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;Persist Security Info=False;Initial Catalog=Database;Data Source=SERVER2006\SQLEXPRESS;User ID=dan;Password=1111"
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now