[Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file.
- Grant the user who is accessing the database (usually the IUSR_<computername> account) full control to the share or folder.
- Sometimes permissions are restricted on the share because the file is intended to be read-only. You may want to try to change the connection mode, which the following code demonstrates:
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode = adModeShareDenyWrite '8
'---- ConnectModeEnum Values ----
'Const adModeUnknown = 0
'Const adModeRead = 1
'Const adModeWrite = 2
'Const adModeReadWrite = 3
'Const adModeShareDenyRead = 4
'Const adModeShareDenyWrite = 8
'Const adModeShareExclusive = &Hc
'Const adModeShareDenyNone = &H10
Article ID: 306441 - Last Review: Aug 4, 2008 - Revision: 1