Groups | Blog | Home
all groups > sql server connect > november 2003 >

sql server connect : login fails re trusted sql server connection


Sue Hoegemeier
11/19/2003 10:15:07 AM
It sounds like you are trying to use a SQL login but that
your server is configured for Windows Authentication only.
Try changing SQL Servers authentication to Windows and SQL
Server and restart SQL service for changes to take affect.

-Sue

On Wed, 19 Nov 2003 11:03:57 -0600, "J Harrigan"
[quoted text, click to view]
J Harrigan
11/19/2003 11:03:57 AM
On my local machine running Win XP Pro, a sql server login fails: ][SQL
Server]Login failed for user 'userid'. Reason: Not associated with a trusted
SQL Server connection.

The connection to sql server is specified in a web file called
dataconnection.asp:

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Driver={SQL Server};" & _
"Server=mycomputername;" & _
"Database=dbname;" & _
"Uid=userid;" & _
"Pwd=password;"

I went to sql server, created a user that matched the user id above,
assigned the password exactly as shown in dataconnection.asp, and assigned
rights to the database 'hotels' and assigned roles as 'public' and
'db_owner'. But I'm still getting the same error.

I've also checked and doublechecked computername, database name, userid, and
password.

I also tried this on my web server, and the connection to sql server worked
first time.

Any thoughts as to what's wrong and where? Thanks...Jan

J Harrigan
11/19/2003 4:00:28 PM
Yes I am using windows authentication and that HAS to be it. THANK YOU!!!!

[quoted text, click to view]

AddThis Social Bookmark Button