Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good day to you all. I developed an application in vb 2010 that uses reports processed locally. The application is working properly with the following connection string:
"Data Source=192.168.1.222;Initial Catalog=ITEM_MGR;user id=sa; Password=michaels" But the each time i try to view the report, the following error appears: Login failed. The login is from an untrusted domain and cannot be used with windows authentication. Please any help with this will be appreciated.

Thanks
Frank

What I have tried:

1. Added a configuration file with the same connection string.
2. used Data source full name, the login name and the password.

eg. Data source= Amd-pc;initial catalog=Itm_mgr;Uiser id=sa; Password=michaels
3. Disabled my windows fire wall
Posted
Updated 1-Jul-16 21:07pm

It would appear that your SQL Server is setup for Windows Authentication only and you're trying to pass sn SQL login in the connection string.

You have to modify the SQL Server to allow Mixed authentication, Windows Auth and SQL auth.

Also, using the SA account to do this stuff is a MASSIVE security risk. NEVER use the SA account for anything.
 
Share this answer
 
Thanks Dave. my SQL is setup to use mixed mode for both windows and SQL authentication. However, i did used the SA for the connection authentication as the DB is in a different PC from the application. But can the windows account be valid for the connection?

Thanks again, Mr. Dave.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900