trusted sql server connection

trusted sql server connection

am 16.11.2005 20:01:07 von Chris Kemp

I'm trying to put together a little sql server asp project first on my pwn
machine under IIS, then on a clients machine.

I'm using the following connect string:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={SQL
Server};SERVER=computer;DATABASE=thedatabasename;UID=userid; PWD=password;"

and have setup userid as a public user with limited rights.

I am getting this error when I try to run the login:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'userid'. Reason: Not associated with a trusted SQL Server connection.

Now I'm stumped on what I can do to to connect on my IIS, and later on the
client's.

Anyone run into this before? Sure could use some advice.

TIA

Re: trusted sql server connection

am 16.11.2005 21:10:43 von Roland Hall

"Chris Kemp" wrote in message
news:%23o8i6%23t6FHA.3340@TK2MSFTNGP10.phx.gbl...
: I'm trying to put together a little sql server asp project first on my pwn
: machine under IIS, then on a clients machine.
:
: I'm using the following connect string:
:
: Set Conn = Server.CreateObject("ADODB.Connection")
: Conn.Open "DRIVER={SQL
: Server};SERVER=computer;DATABASE=thedatabasename;UID=userid; PWD=password;"
:
: and have setup userid as a public user with limited rights.
:
: I am getting this error when I try to run the login:
:
: Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
: 'userid'. Reason: Not associated with a trusted SQL Server connection.
:
: Now I'm stumped on what I can do to to connect on my IIS, and later on the
: client's.
:
: Anyone run into this before? Sure could use some advice.

Try this instead:

oConn.Open "Provider=sqloledb;" & _
"Data Source=myServerName;" & _
"Initial Catalog=myDatabaseName;" & _
"User Id=myUsername;" & _
"Password=myPassword"

This page will tell you about your error:
http://support.microsoft.com/kb/q307002/

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp