hello all,

I have a webservice which writes requests to a requests log table in
sql server

I have a windows service with a function that kicks-off every 30
seconds to process the records in the requests log table.

The function retrieves pending requests (STATUS = 0) and adds them to a
datatable using a sqldataadapter
once the record has been processed, the STATUS column is set to 1, so
that it is not processed again.

I know that records can be locked for update, but is there a way to
lock records for select ?

e.g.

The requests log table has 20 pending requests which are picked up and
added to the dataset..
in the 30 second interval between function iterations, only 5 are
proocessed.
The function runs again and 15 of the original requests are added to
the dataset

Is there some mechanism to prevent these 15 requests from being added
to the dataset ?

Thanks in advance