B
Brandon Lepley
I have a simple asp page that opens an mdb, reads it, updates 1
record, closes it. Here's the code:
Set Conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
serverr.MapPath ("LAUSDNutriCounter.mdb")
Rs.CursorType = 2
Rs.LockType = 3
strSQL = "SELECT * FROM NutriCounter"
Rs.Open strsql, Conn
unlockednum = rs.fields("Unlocked")
rs.fields("Unlocked") = unlockednum - 1
rs.update
rs.close
Conn.Close
set rs = nothing
Set Conn = Nothing
This page works fine the first time its ran. But if you run it within
60 seconds again it comes up with the error "An error occurred on the
server when processing the URL". I've tracked down where it errors
and it is the line "Conn.Open ...". However, if i wait 60 seconds or
more between running the page it works.
Is there some kind of lock on the db that is not letting go for 60
seconds?
Please help and thanks in advance,
Brandon
record, closes it. Here's the code:
Set Conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
serverr.MapPath ("LAUSDNutriCounter.mdb")
Rs.CursorType = 2
Rs.LockType = 3
strSQL = "SELECT * FROM NutriCounter"
Rs.Open strsql, Conn
unlockednum = rs.fields("Unlocked")
rs.fields("Unlocked") = unlockednum - 1
rs.update
rs.close
Conn.Close
set rs = nothing
Set Conn = Nothing
This page works fine the first time its ran. But if you run it within
60 seconds again it comes up with the error "An error occurred on the
server when processing the URL". I've tracked down where it errors
and it is the line "Conn.Open ...". However, if i wait 60 seconds or
more between running the page it works.
Is there some kind of lock on the db that is not letting go for 60
seconds?
Please help and thanks in advance,
Brandon