Skip to main content
May 26, 2006
Answered

Connection string problems asp

  • May 26, 2006
  • 1 reply
  • 404 views
Hi

I have inherited a website and need to make some urgent changes, currently all the recordsets are handcoded and are in an absolute mess, I have upsized to SQL server to allow me to create the new recordsets through DWMX, however the site is a long way from being ready to change over to the new DB and I am unable to connect to the access DB.

The database is an access db with a security.mdw file that controls access how can I make changes to my connection string to connect? I have included my latest effort below.

Dim MM_conTest_STRING
MM_conTest_STRING.Mode = adModeReadWrite
MM_conTest_STRING.Provider = "Microsoft.Jet.OLEDB.4.0"
MM_conTest_STRING.Properties("Jet OLEDB:System Database") = Server.MapPath("***\Security.mdw")
MM_conTest_STRING.Properties("User ID") = "***"
MM_conTest_STRING.Properties("Password") = "****"
MM_conTest_STRING.Open Server.MapPath("***\Database.mdb")
MM_conTest_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("****\Database.mdb")

However this only gets me the following error:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/fporiginal/Connections/conTest.asp, line 9

If I remove everything except the last line I get the following error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] You do not have the necessary permissions to use the '(unknown)' object. Have your system administrator or the person who created this object establish the appropriate permissions for you.
/fporiginal/categories.asp, line 15

Any help gratefully received

Cheers
Ossie
This topic has been closed for replies.
Correct answer
Duh! solved my own problem - the answer for anyone interested is:

MM_ConTest_String = "Driver={Microsoft Access Driver (*.mdb)}; Dbq=" & Server.MapPath("***\Database.mdb") & ";SystemDB= " & Server.MapPath("****\Security.mdw") & ";uid=*****;pwd=***** "

1 reply

Correct answer
May 26, 2006
Duh! solved my own problem - the answer for anyone interested is:

MM_ConTest_String = "Driver={Microsoft Access Driver (*.mdb)}; Dbq=" & Server.MapPath("***\Database.mdb") & ";SystemDB= " & Server.MapPath("****\Security.mdw") & ";uid=*****;pwd=***** "