Can the RowUpdating event make the Update skip a row?

J

John Saunders

Is it ever possible for a RowUpdating event (SqlRowUpdating, etc.) handler
to cause the Update to skip the row? For instance, if e.Status is set to
UpdateStatus.SkipCurrentRow, is the current row still updated?

If so, it's not clear from the documentation, and I'd love to see a
documentation reference saying that this is true, either in general or for a
particular ADO.NET provider.

If it's not possible, then does anyone know why not?

John Saunders
 
M

Michelle Hlaing

Hi John,

This is what I have found in the help documentation:

Member name

Continue - The DataAdapter is to continue proccessing rows.
ErrorsOccurred - The event handler reports that the update should be treated as an error.
SkipAllRemainingRows - The current row and all remaining rows are not to be updated.
SkipCurrentRow - The current row is not to be updated.

Hope that helps,

Michelle

***Disclaimer: This posting is provided "as is" with no warranties and confers no rights.***
--------------------
 
J

John Saunders

Michelle Hlaing said:
Hi John,

This is what I have found in the help documentation:

Member name

Continue - The DataAdapter is to continue proccessing rows.
ErrorsOccurred - The event handler reports that the update should be
treated as an error.
SkipAllRemainingRows - The current row and all remaining rows are not to
be updated.
SkipCurrentRow - The current row is not to be updated.

Thanks, Michelle, I saw that documentation.

What I didn't see is whether changing the status within the event will cause
the Update operation to obey the new status. Could you check on that for me,
please?

Thanks,
John Saunders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top