-
I'm using VBA with DAO to open a recordset from an Access table. This all works fine.
The problem comes when I attempt to overwrite the old table with a new one. I get a "database locked" error, ostensibly because someone else on the floor is using it.
I have tried using DBEngine.Idle dbFreeLocks,
but this didn't help.
How can I provide read-only access to the table so the recordset can be produced, without locking the table? Thanks for any suggestions.
-
Have you tried defining your recordset as a snapshot like the following?
Code:
Dim ssWorldFeatures As Snapshot
Set ssWorldFeatures = gdbRWTS.CreateSnapshot("Select * From WorldFeatures order by ID")
------------------
Marty
-
Originally I was opening it as "dbOpenSnapshot". Is this the same thing?
I used CreateSnapshot, and got this error:
Compile Error:
Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.
[This message has been edited by billwagnon (edited 01-03-2000).]
-
It should be the same thing. You got an error because we are using different versions of DAO.
------------------
Marty
-
How can I change the version?
-
Update VB5 to VB6 or apply the latest SR to what you have.