views:

73

answers:

1

I am trying to lock a record from a .mdb with OLEDB using .NET. How do I do that?

How can I lock an entire table as well?

A: 

When opening your recordset, you should be able to declare a locking strategy at the record level, either optimistic (meaning the record is locked at update time only) or pessimistic (the record is locked from the begining of the edit process untill update time).

I am not sure you can lock a whole table through oledb connection. Why don't you open it 'read only'?

Philippe Grondier
can you write some sample source code just to get an idea?
Killercode
Er, you need sample code for choosing a parameter for opening a recordset? Surely you already know how to open the recordset, so it's simply a matter of checking in the documentation for OLEDB exactly what the options are that can be supplied as parameters to the command that opens your recordset.
David-W-Fenton
You took the words out of my mouth ....
Philippe Grondier