How to rerun a sub with a SQL UPDATE statement IF not successful first time?

  • Thread starter Thread starter KathyB
  • Start date Start date
K

KathyB

Hi,

I have a Sub procedure where I retrieve an xml string from a single
field:
(1) SELECT FieldA FROM tblTEST WHERE...
(2) Append an element to the DOM
(3) UPDATE FieldA...

In the unlikely (but always possible) event that the UPDATE action
bumps heads with someone else's UPDATE to the same field, how would I
tell the sub to start from the beginning of the sub IF the UPDATE was
not successful...sorry, but I have no clue...how do I even capture if
the UPDATE doesn't happen?

TIA,
Kathy
 
ExecuteNonQuery return an integer representing the # of rows effected. If
that is 0, you need to rerun your sub.
 
Thanks, Marina. I'm not too swift on this stuff. Any chance of point me
to an example?

Thanks.
Kathy
 
Back
Top