Guest_imported
New member
- Jan 1, 1970
- 0
I wrote my asp code with access db connection. Everything works great.
Now, we are converting our db from access to sql server db.
But now, I can't connect to sql server db.
Please take a look at the access db connection syntax followed by that of sql server and tell me why I am getting this error.
How can I fix the error?
--This is access connection: this works fine
set conn = Server.CreateObject("ADODB.connection"
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("\Boards\db\aboard.mdb"
& ";" & _
"Persist Security Info=False"
conn.Open(sConnection)
--This is sql server connection syntax: This is the one
--failing!
set conn = Server.CreateObject("ADODB.connection"
Conn.open "DSN=boards;UID=myuserid;PWD=mypwd"
--This is the error message I am getting!!
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'PW2\IUSR_PW2'.
/boards/default.asp, line 21
Now, we are converting our db from access to sql server db.
But now, I can't connect to sql server db.
Please take a look at the access db connection syntax followed by that of sql server and tell me why I am getting this error.
How can I fix the error?
--This is access connection: this works fine
set conn = Server.CreateObject("ADODB.connection"
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("\Boards\db\aboard.mdb"
"Persist Security Info=False"
conn.Open(sConnection)
--This is sql server connection syntax: This is the one
--failing!
set conn = Server.CreateObject("ADODB.connection"
Conn.open "DSN=boards;UID=myuserid;PWD=mypwd"
--This is the error message I am getting!!
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'PW2\IUSR_PW2'.
/boards/default.asp, line 21