Wrox Home  
Search P2P Archive for: Go

  Return to Index  

activex_data_objects thread: Record Locking


Message #1 by graneype@d... on Tue, 19 Jun 2001 07:53:30
I have read all of the messages concerning record locking with ADO.  Maybe 

I missed something.



I am working with VB 6, ADO, and Access and am trying to put a record lock 

on a row of a table to prohibit anyone else from editing it.  I've tried 

LockType = adLockPessimistic but when I test it with two users accessing 

the same record both can edit it.  It is only when one issues the .Update 

command that an error is triggered.



I can think of ways to set up my own record locking scheme but it is very 

unelegant and fails if the user has to ungracefully exit my program.



Any tips out there?  What are other people doing?  This seems like a very 

basic feature that ADO should have.



Thanks

Message #2 by "Simply Red" <simplyred@e...> on Wed, 20 Jun 2001 04:56:58
since your using Access, i suggest opening the database using DAO, since 

it has a better feature when working with Microsoft Jet databases, 

especially with record locking in mind. DAO is still much better suited 

for accessing databases that uses Jet engine than ADO, although you might 

not like the idea of using DAO.



Future versions of ADO would probably implement some of the capabilities 

that DAO provides when working with Jet databases





> I have read all of the messages concerning record locking with ADO.  

Maybe 

> I missed something.

> 

> I am working with VB 6, ADO, and Access and am trying to put a record 

lock 

> on a row of a table to prohibit anyone else from editing it.  I've tried 

> LockType = adLockPessimistic but when I test it with two users accessing 

> the same record both can edit it.  It is only when one issues 

the .Update 

> command that an error is triggered.

> 

> I can think of ways to set up my own record locking scheme but it is 

very 

> unelegant and fails if the user has to ungracefully exit my program.

> 

> Any tips out there?  What are other people doing?  This seems like a 

very 

> basic feature that ADO should have.

> 

> Thanks


  Return to Index