I am using some ASP code to access SQL databases . The connection code is as shown below but fails on the last
line with:
"Login failed for user 'abcd'."
I'm not sure why abcd's name appears (he's now left us). I'm logged in my PC as 'cdef' and when I write ASP code to query my logon, the result is "cdef", so how abcd's name arises, I don't know. This only happens with one of the databases; I can access another DB without problem using the same code.
Do I need to add anything else to the connection string for Windows NT authentication, or is there a permissions problem with the database?
the code:
Call OpenDIR()
Sub OpenDIR()
Set cnDIR =
Server.CreateObject("ADODB.Connection")
'Connection to SQL Server without using ODBC data source.
cnDIR.Provider = "sqloledb"
cnDIR.Open "Driver={SQL Server};Server=server1; Database=DB1"
End Sub
thx
TK
line with:
"Login failed for user 'abcd'."
I'm not sure why abcd's name appears (he's now left us). I'm logged in my PC as 'cdef' and when I write ASP code to query my logon, the result is "cdef", so how abcd's name arises, I don't know. This only happens with one of the databases; I can access another DB without problem using the same code.
Do I need to add anything else to the connection string for Windows NT authentication, or is there a permissions problem with the database?
the code:
Call OpenDIR()
Sub OpenDIR()
Set cnDIR =
Server.CreateObject("ADODB.Connection")
'Connection to SQL Server without using ODBC data source.
cnDIR.Provider = "sqloledb"
cnDIR.Open "Driver={SQL Server};Server=server1; Database=DB1"
End Sub
thx
TK