
ADO2: pessimistic lock with Jet oldedb 3.51 prob.
hi all,
i'm trying implementing pessimistic locking with jet oledb provider on vb6
pro sp2, ado 2 retail version included on vb6 cdrom.
on a connection with .mode=adModeReadWrite, .cursorLocation adUseServer,
recordset with locktype adLockpessimistic, cursorlocation adUseServer,
cursortype adOpenKeyset or cursortype adOpenStatic
on record fetch i try an implicit edit with
recSet.fields(0).value=recSet.fields(0).value
trapping the error if any, but i never get an error, even with other app.
using explicit dao code recset.edit on te same record..
i'm surely wrong, but i can't see were..
i tryed
recSet.Fields(0).value=recSet.Fields(0).value
recSet.update
when the record was locked by other app with dao code
and this way i get an error (err.description "An error occured".... )
but when the record is not locked by other apps this kind of lock is
released, so this is not the right way..
any hits woul'd be appreciate...
tia
Andrea Montanari