This problem is driving me mad and it has only become present since I switched to Win2000 - this could also mean it was when I switched to IE 6.0.
I connect to an Access database using a DSN string as follows:
--------------------------------------------------------
strConnection = "DRIVER=Microsoft Access Driver (*.mdb);" &_
"UID=admin;" &_
"PageTimeout=0" &_
"Password=xxxxx;" &_
"DBQ=" & strDatabasePath & ";"
Set RecordSet = Server.CreateObject("ADODB.RecordSet"
RecordSet.CursorLocation = adUseClient
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open strConnection
strQuery = "SELECT Date, Headline, Story FROM News ORDER BY Date"
RecordSet.Open strQuery, objConn, adOpenStatic, adLockBatchOptimistic
--------------------------------------------------------
I then use the Recordset and close the connection with:
--------------------------------------------------------
RecordSet.Close
Set RecordSet = Nothing
objConn.Close
Set objConn = Nothing
--------------------------------------------------------
This works the first time I load the page, but when I refreash it, I get the error:
--------------------------------------------------------
Error Type:
Provider (0x80004005)
Unspecified error
--------------------------------------------------------
I'm assuming that the database is locking. Is there anyway I can get round this?
Thanks,
Carl
I connect to an Access database using a DSN string as follows:
--------------------------------------------------------
strConnection = "DRIVER=Microsoft Access Driver (*.mdb);" &_
"UID=admin;" &_
"PageTimeout=0" &_
"Password=xxxxx;" &_
"DBQ=" & strDatabasePath & ";"
Set RecordSet = Server.CreateObject("ADODB.RecordSet"
RecordSet.CursorLocation = adUseClient
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open strConnection
strQuery = "SELECT Date, Headline, Story FROM News ORDER BY Date"
RecordSet.Open strQuery, objConn, adOpenStatic, adLockBatchOptimistic
--------------------------------------------------------
I then use the Recordset and close the connection with:
--------------------------------------------------------
RecordSet.Close
Set RecordSet = Nothing
objConn.Close
Set objConn = Nothing
--------------------------------------------------------
This works the first time I load the page, but when I refreash it, I get the error:
--------------------------------------------------------
Error Type:
Provider (0x80004005)
Unspecified error
--------------------------------------------------------
I'm assuming that the database is locking. Is there anyway I can get round this?
Thanks,
Carl