Solved

VB.Net 2005 Cannot Login With SQLAuthentication

Posted on 2011-02-11
3
265 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.

911 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

20 Experts available now in Live!

Get 1:1 Help Now