Hi guys,
I'm having problem locking a table in Ms Access using VB6 code.
Actually I have 3 tables.
Assume table names is A, B, C.
Following is the process.
1. Open table A and update table A. (Must Lock the table A)
2. Open table B and update table B.
3. Open table C and update table C.
4. Open table A and update table A again.(After update...Release the
lock)
Once I open table A for update, I dont want another user to access
table A until i finish step 2, 3, 4. Once step 4 is complete, then I
want to release the lock for table A.
How to do it guys. Hopefully i have given enough and simple explanation
for you to help me.
Thanks Guys.
salad - 03 Feb 2006 15:57 GMT
> Hi guys,
>
[quoted text clipped - 18 lines]
>
> Thanks Guys.
Here's an example of doing it in Access using DAO.
Dim r As Recordset
Set r = CurrentDb.OpenRecordset("Table1", dbOpenSnapshot,
dbDenyWrite + dbDenyWrite)
r.Close
Set r = Nothing
equalive - 06 Feb 2006 08:40 GMT
Is there a same way I can use using ADO? Because at the moment all my
connection is using ADO.
salad - 06 Feb 2006 19:08 GMT
>> Hi guys,
>>
[quoted text clipped - 25 lines]
> r.Close
> Set r = Nothing
I don't have a help file for ADO, tho I do for Access DAO. Maybe go to
Google Groups, enter "ADO deny read write exclusive" in groups "*ADO*"
or "*ACCESS*" and see what you come up with.