Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking Records using ADODB and ACCESS in VB6

Status
Not open for further replies.

Genotix

Programmer
Dec 16, 2004
53
0
0
NL
Hi All,

I've searched my @$$ of for sites that give me information about this subject and I hope some of you can help me out here.

I've got a table in ACCESS with a records that I put in a recordset using ADODB.
Cursortype = adOpenForwardOnly
LockType = adLockPessimistic

Now I'd like to lock the selected records in the recordset for writing as soon as i've read them into the recordset.

I want to release the lock as soon as the DB recordset is closed.

How can I do this?

Thanx in advance!

Linux IS userfriendly.
It's only very selective about who it's friends are.
 
If you use Pessimistic and change you cursortype to be keyset or dynamic or static, then this will lock the table for you until you explicitly close the recordset i.e. rs.close


"I'm living so far beyond my income that we may almost be said to be living apart
 
I suppose the CursorLocation must be set to adUseServer?

Thanx!

Linux IS userfriendly.
It's only very selective about who it's friends are.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top