I have a simple asp page that opens an mdb, reads it, updates 1
record, closes it. Here's the code:
Set Conn = Server.CreateOb ject("ADODB.Con nection")
set rs = Server.CreateOb ject("ADODB.Rec ordset")
Conn.Open "DRIVER={Micros oft Access Driver (*.mdb)}; DBQ=" &
serverr.MapPath ("LAUSDNutriCou nter.mdb")
Rs.CursorType = 2
Rs.LockType = 3
strSQL = "SELECT * FROM NutriCounter"
Rs.Open strsql, Conn
unlockednum = rs.fields("Unlo cked")
rs.fields("Unlo cked") = 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.CreateOb ject("ADODB.Con nection")
set rs = Server.CreateOb ject("ADODB.Rec ordset")
Conn.Open "DRIVER={Micros oft Access Driver (*.mdb)}; DBQ=" &
serverr.MapPath ("LAUSDNutriCou nter.mdb")
Rs.CursorType = 2
Rs.LockType = 3
strSQL = "SELECT * FROM NutriCounter"
Rs.Open strsql, Conn
unlockednum = rs.fields("Unlo cked")
rs.fields("Unlo cked") = 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
Comment