Hello all,
I've been trying to make a simple asp frontend for an access database. However, I keep getting an error with the line of code:
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\travel\flights.mdb"
but only when the page is requested more than once, the first time it works fine.
Here is the base of my code,
<%
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\travel\flights.mdb"
sql = "select * from flights"
Set RS = Conn.Execute(sql)
%>
<SOME HTML>
<%
while NOT RS.EOF
%>
<READS SOME VALUES FROM THE DB>
<%
end if
RS.MoveNext
wend
RS.Close
Conn.Close
%>
Can anyone see any obvious errors, or may it be a way in which the server is set up?
I can't set up a DSN connection on the server due to access rights, and the db was created in Access XP
Thanks
Rob
I've been trying to make a simple asp frontend for an access database. However, I keep getting an error with the line of code:
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\travel\flights.mdb"
but only when the page is requested more than once, the first time it works fine.
Here is the base of my code,
<%
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\travel\flights.mdb"
sql = "select * from flights"
Set RS = Conn.Execute(sql)
%>
<SOME HTML>
<%
while NOT RS.EOF
%>
<READS SOME VALUES FROM THE DB>
<%
end if
RS.MoveNext
wend
RS.Close
Conn.Close
%>
Can anyone see any obvious errors, or may it be a way in which the server is set up?
I can't set up a DSN connection on the server due to access rights, and the db was created in Access XP
Thanks
Rob