Could not lock file
- From: dan <dan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 May 2005 03:18:09 -0700
I am experiencing a lot of trouble with this error
"Could not lock file"
Access 2000, Ado 2.8
Basically what i am doing is opening and closing a connection to a database
50.
When i have to instances of the application running then there is no
problem, as soon as i start a third instance then the error occurs.
I know MS says no more than 20 users for Access but this is just 3 and it
bombs, any ideas.
Code to open and close db connections
On Error GoTo errStuffed
lblStart.Caption = "Start: " & Now
Dim lngCount As Long, sConnString As String, Conn As ADODB.Connection
lngCount = 1
Do Until lngCount = txtTime1.Text + 1
Set Conn = New ADODB.Connection
With Conn
.ConnectionString = "Data Source=" &
gclsSystem.DBFileNames.gsDBs1sdf & ";"
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Password").Value = "*****"
.Properties("User ID").Value = "******"
.Properties("Jet OLEDB:System database").Value =
gclsSystem.DBFileNames.gsDBSystem
.Mode = adModeShareDenyNone
.Open
End With
lblStatus1.Caption = "Open " & lngCount
Conn.Close
Set Conn = Nothing
lblStatus1.Caption = "Closed " & lngCount
DoEvents
lngCount = lngCount + 1
Loop
lblEnd.Caption = "End: " & Now
MsgBox "DONE"
.
- Follow-Ups:
- RE: Could not lock file
- From: VN
- RE: Could not lock file
- Prev by Date: RE: Trying to use ExecuteNonQuery on Command crashes
- Next by Date: Using nested transactions with Ado.net and access possible?
- Previous by thread: How to update a table only with the missing row (identified by pri
- Next by thread: RE: Could not lock file
- Index(es):