Avatar of gcook17
gcook17Flag for United States of America

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\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"
Microsoft SQL ServerVisual Basic.NETMicrosoft IIS Web Server

Avatar of undefined
Last Comment
gcook17
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of gcook17
gcook17
Flag of United States of America image

ASKER

Thanks
Avatar of gcook17
gcook17
Flag of United States of America image

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;Persist Security Info=False;Initial Catalog=Database;Data Source=SERVER2006\SQLEXPRESS;User ID=dan;Password=1111"
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo