Hello
I am using the following script to show the records I have in a MS database:
<%
Dim DB, TBL
Set DB = Server.CreateObject("ADODB.Connection")
Set TBL = Server.CreateObject("ADODB.RecordSet")
DB.Mode = adModeReadWrite
DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("Form.mdb"))
TBL.Open "Enquiries" ,DB
While NOT TBL.EOF
Response.Write("Name = " & TBL("Name") & "<br>")
Response.Write("Surname = " & TBL("Surname") & "<br>")
Response.Write("Country = " & TBL("Country") & "<br>")
Response.Write("Hobbies = " & TBL("Hobbies") & "<br>")
Response.Write("Date = " & TBL("Date") & "<br><br><br>")
TBL.MoveNext
Wend
TBL.Close
DB.Close
Set DB = Nothing
Set TBL = Nothing
%>
With the .asp file in the same directory as the database, this seems to work fine.
However, I need to move the database to a folder called private and use a physical connection.
I need to use something like this:
conn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\bus\web.com\private\Form.mdb;"
but don't seem to be having much joy in getting it to work.
I would be grateful for any advice.
Thanks.
Steve
I am using the following script to show the records I have in a MS database:
<%
Dim DB, TBL
Set DB = Server.CreateObject("ADODB.Connection")
Set TBL = Server.CreateObject("ADODB.RecordSet")
DB.Mode = adModeReadWrite
DB.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath("Form.mdb"))
TBL.Open "Enquiries" ,DB
While NOT TBL.EOF
Response.Write("Name = " & TBL("Name") & "<br>")
Response.Write("Surname = " & TBL("Surname") & "<br>")
Response.Write("Country = " & TBL("Country") & "<br>")
Response.Write("Hobbies = " & TBL("Hobbies") & "<br>")
Response.Write("Date = " & TBL("Date") & "<br><br><br>")
TBL.MoveNext
Wend
TBL.Close
DB.Close
Set DB = Nothing
Set TBL = Nothing
%>
With the .asp file in the same directory as the database, this seems to work fine.
However, I need to move the database to a folder called private and use a physical connection.
I need to use something like this:
conn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\bus\web.com\private\Form.mdb;"
but don't seem to be having much joy in getting it to work.
I would be grateful for any advice.
Thanks.
Steve