
ADO With Jet Provider, Multi User Hell, Please help
Please help before I go completely insane with this damn locking
issue:
I have been given the task of writing a simple multi user fault
logging application using the Jet engine OLEDB 4.0 provider for ADO
2.1.
The users have a VB6 client (running on NT4 SP5) which has a data
entry form where they can add and modify records. The users select
records from an ADO data grid, which is bound to an ADO data control,
also several textboxes are bound to this data control. The ADO data
controls record source is set in code to a client side ADO recordset.
My problem occurs when two or more users select the same record from
the data grid and modify data. If one user moves off the record (After
they have made their changes) the record is saved as expected. However
if another user also changes this record and saves it no error is
flagged to say the data has been changed (by the other user) and the
new changes are written to the database overwriting the original
changes! (most annoying)
Ideally what I would like to do is to exclusively lock the record when
the user selects it from the data grid, i.e. an error is raised when
someone else tries to modify it!
Looking at the MS VB help, it states that a client side Jet cursor
based recordset is opened as a keyset (ok) with optimistic locking
(not ok) Is there any way I can open a pessimistically locked cursor
using ADO with this provider?
Or does anyone have another solution I could try or an example multi
user MS Access DB with VB front end using ADO 2.1 which might be of
help?
Any information to point me in the right direction would be much
appreciated
Thanks
'Hotmail'
P.S. Don't ask me why my company wants to use ADO with Access, I'm
just a grunt and do what I'm told!