question

sanj_love89 avatar image
sanj_love89 asked

SQL server 2005 in VC++ using CLI

Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user ''. The user is not associated with a trusted SQL Server connection. SQLSTATE: 28000 This error is occurred in SQLDriverConnect method connString= "DRIVER={SQL Server Native Client 10.0};SERVER=IPofServer\\SQLEXPRESS;DATABASE=DBName;Trusted_Connection=yes;"; SQLDriverConnect (sqlconnectionhandle , NULL , (SQLCHAR*)connString , SQL_NTS , retconstring , 1024 , NULL , SQL_DRIVER_NOPROMPT )); I m Using Remote Database means Database is on server and client is on another host(Machine) Please help Thanxs in Advance
sql-server-2005sql-azurevisual-studio-2005
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
This is probably down to your user ID (or the user ID under which the application is running) hasn't been granted access to the SQL Server to which you are trying to connect. "Trusted_Connection" means that the SQL Server is using your Active Directory credentials to connect, rather than using a SQL Server user name / password.
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sanj_love89 avatar image
sanj_love89 answered
Thanxs Thomas Rushton But how to granted access to the SQL Server to which Client trying to connect
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.