x
login about faq Site discussion (meta-askssc)

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

more ▼

asked Apr 07 '12 at 05:04 AM in Default

sanj_love89 gravatar image

sanj_love89
0 1 1 1

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Thanxs Thomas Rushton

But how to granted access to the SQL Server to which Client trying to connect

more ▼

answered Apr 09 '12 at 05:07 AM

sanj_love89 gravatar image

sanj_love89
0 1 1 1

(comments are locked)
10|1200 characters needed characters left

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.

more ▼

answered Apr 07 '12 at 09:22 PM

ThomasRushton gravatar image

ThomasRushton ♦
29.4k 6 9 36

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1834
x19
x2

asked: Apr 07 '12 at 05:04 AM

Seen: 666 times

Last Updated: Apr 09 '12 at 05:07 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.