I agree, I've seen cases where a record was locked when it was opened. The
person going out to lunch, leaving it locked and others who needed access to
it being unable to get it until he/she came back and released the lock.
Not a good idea unless you realy think through and handle all the
unexpected problem scenarios, which is a lot of work.
Regards,
Bob
"Kerry Moorman" <Ke**********@discussions.microsoft.comwrote in message
news:EC**********************************@microsof t.com...
HDI,
The disconnected architecture of ado.net encourages optimistic locking to
deal with concurrency issues. This is the approach used by most of the
ado.net code that I have encountered.
You can still make pessimistic locking work, but unless you have a really,
really good reason to do so, you should first consider using optimistic
locking.
Kerry Moorman
"HDI" wrote:
>Hi,
I'm writing a windows application where users can update records but
how can I lock a record when a user opens it.
With ado and vb6 you can lock the opened record but with ado.net I
don't know how to do this.
I am using vb.net and SQL Server.
thx.