Hi All,

I have a strange problem I am hoping someone will be able to help
with.

I developed an app in VB.net 2008 (Framework 3.5) that basically makes
a call to a stored proc (MS SQL 2000) to load a datareader.  The
stored proc first selects a bunch of records then updates the same
records (just setting a processing flag to 1 and a processing date to
GetDate()) based on the same where clause.

The app then loops through the datareader processing each record and
then updating the records processing flag to processed (2).  I have no
choice but to call a stored proc for each record processed as no batch
update is available.

This used to work fine and still does on other apps we have have
however for this particular app a strange error has suddenly started
to occur.  When I make the first call to fill the datareader the
select is fine and works as expected but the update (to set the
processed to 1 and processeddate to GetDate()) is totally ignored.  I
have tried everything but nothing seems to work.  If #I make the call
to the stored proc via Query Analyzer it works as expected ie the
records are returned and the processing flag and date is updated.

Another thing I have noticed is that the call to fill the datareader
does return the records without updating the flag and the app
continues to try and process them.  However the update to set the
record as processed is being blocked on the SQL server by the initial
select that filled the datareader.

Very odd!!  Any help would certainly be appreciated.

Many Thanks

Fred


Reply via email to