Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all
after creating ODBC Connection to another server in another domain and connected success from administrator user but when I try to get data by another user it gives me the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

I appreciate any help.
Regards.

What I have tried:

I have tried to create User SDN in ODBC Connection
Posted
Updated 15-Jan-18 4:30am

1 solution

Read the error message:
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
That means that your connection string to SQL is trying to use Windows Authentication, and the computer trying to access SQL Server is not on the same network segment.
For example:
C#
Data Source=GRIFF-DESKTOP\SQLEXPRESS;Initial Catalog=TestDB;Integrated Security=True
To access SQL from a untrusted domain, you must supply an appropriate SQL login, rather than authenticate via Windows:
Data Source=GRIFF-DESKTOP\SQLEXPRESS;Initial Catalog=TestDB;Integrated Security=False;User Id=userid;Password=password
 
Share this answer
 
v2

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