|
-
Jan 3rd, 2000, 05:38 AM
#1
Thread Starter
Hyperactive Member
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.
-
Jan 3rd, 2000, 06:36 AM
#2
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
-
Jan 3rd, 2000, 06:39 AM
#3
Thread Starter
Hyperactive Member
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).]
-
Jan 3rd, 2000, 07:31 AM
#4
It should be the same thing. You got an error because we are using different versions of DAO.
------------------
Marty
-
Jan 3rd, 2000, 12:53 PM
#5
Thread Starter
Hyperactive Member
How can I change the version?
-
Jan 5th, 2000, 02:37 AM
#6
Frenzied Member
Update VB5 to VB6 or apply the latest SR to what you have.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|