I am currently having some trouble getting connected to a MS Access Database using SQL.
If I place the database in the same folder as my ASP files the connection works using the following code:
'Create DB Connection
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("CSC_Support.mdb") & ";"
objConn.Open
But I would like it to connect to the database over the network.
I have tried this and it doesn't work:
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("//dcfile02/tdrive$/cadd/Support/Database/CSC_Support.mdb") & ";"
objConn.Open
I have tried placing it directly after the Data Source as well and it doesnt connect.
I am rather new to ASP is there something I am missing?
If I place the database in the same folder as my ASP files the connection works using the following code:
'Create DB Connection
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("CSC_Support.mdb") & ";"
objConn.Open
But I would like it to connect to the database over the network.
I have tried this and it doesn't work:
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath ("//dcfile02/tdrive$/cadd/Support/Database/CSC_Support.mdb") & ";"
objConn.Open
I have tried placing it directly after the Data Source as well and it doesnt connect.
I am rather new to ASP is there something I am missing?