Hi all,
I would like to connect to a Access2000 database using a DSN-less connection and I don't understand why I keep getting some errors.
Everything works fine if I provide the absolute path to my database like in the snippet:
Set myConn = Server.CreateObject("ADODB.Connection"
myConn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= C:\Inetpub\review\Source\Review.mdb"
If I use the Server.MapPath method like in the following
Set myConn = Server.CreateObject("ADODB.Connection"
Set myPath = Server.MapPath("/review" & "\Source\Review.mdb"
myConn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & myPath
...I get this error:
Microsoft VBScript runtime (0x800A01A8)
Object required: '[string: "C:\Inetpub\review\So"]'
/review/MainProjektNr.asp, line 13
This was the first question. The second one is shorter: does the database have to be located on the server machine. I tried connecting to a database on a remote machine (in the same NT network) and it didn't work at all.
Thanks a lot for any input.
inf33323
I would like to connect to a Access2000 database using a DSN-less connection and I don't understand why I keep getting some errors.
Everything works fine if I provide the absolute path to my database like in the snippet:
Set myConn = Server.CreateObject("ADODB.Connection"
myConn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= C:\Inetpub\review\Source\Review.mdb"
If I use the Server.MapPath method like in the following
Set myConn = Server.CreateObject("ADODB.Connection"
Set myPath = Server.MapPath("/review" & "\Source\Review.mdb"
myConn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & myPath
...I get this error:
Microsoft VBScript runtime (0x800A01A8)
Object required: '[string: "C:\Inetpub\review\So"]'
/review/MainProjektNr.asp, line 13
This was the first question. The second one is shorter: does the database have to be located on the server machine. I tried connecting to a database on a remote machine (in the same NT network) and it didn't work at all.
Thanks a lot for any input.
inf33323