Forum Moderators: open

Message Too Old, No Replies

Problem connecting SQL Database

Problem connecting SQL Database, login faild... help

         

RobE

12:01 pm on Jan 25, 2002 (gmt 0)



Hi, proggs...

I think I have a problem with the dsn-link. I made the dsn connection in SYSTEM-DSN in windows 2000. I´m using a simple connection on my ASP page:

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=dsn-name"

..and Explorer Says:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'computername\IUSR_'computername'.
/connections/dbConn.asp, line 5

Is there somthing wrong with the dsn-link?

Thanx...

Xoc

5:00 pm on Jan 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No. Something is wrong with the permissions. In IIS, each user who hits a web page is logging into the server as IUSR_<computername>, where <computername> is the name of your computer. You need to give this user permissions to access your your SQL Server database.

ralnikov

3:13 pm on Jan 26, 2002 (gmt 0)

10+ Year Member



or set SQL Server login and password in DSN

truecomp

9:46 pm on Sep 25, 2002 (gmt 0)



Hello everyone,

I have the same problem here:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.
/ConnStr.Asp, line 3

Any suggestion?
Many thanks.

Tim

jatar_k

10:17 pm on Sep 25, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] truecomp

Have you tried correcting/checking the permissions as mentioned by Xoc above?