?
Solved

VB.Net 2005 Cannot Login With SQLAuthentication

Posted on 2011-02-11
3
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

770 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