You have not provided a lot of information, so I am going to ask a few
questions..
Are you trying to prevent the row from being updated in multiple places?
There are better methods available. I am sure that others will agree with
that statement: A couple of options that come to mind right away: SQL
Server has a timestamp column that can be used for this type of thing.
Another option: data comparison when you decide to update the row.
Why do you want to "lock" a record when it might not be updated? How do you
unlock the record if the user decides to abandon whatever it is that they
are doing?
--
Keith
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:es*************@TK2MSFTNGP09.phx.gbl...
Hi,
I have different VB.NET-applications that threat records from my table. To
be sure a record isn't threated by two applications at the same time, I
want to leave a mark in the record on the moment it is selected, so the other
applications know they don't have to use that record.
It should be something like this:
SELECT TOP 1 * FROM tblMyTable
WHERE Mark IS NULL
UPDATE Mark = 'Application1' WHERE RecID =
TheIdOfTheRowThatWasJustSelected
Does anybody knwos how to do this?
Thanks a lot in advance!
Pieter