System.data.UpdateStatus

  • Thread starter Thread starter Guido Kraus
  • Start date Start date
G

Guido Kraus

Hi,

I use the RowUpdated event of my DataAdapter to response
to DBConcurrencyExceptions. My event handler looks
something like this:

Private Sub OnRowUpdated(ByVal sender As Object, _
ByVal e As OleDb.OleDbRowUpdatedEventArgs)
'...
End Sub

The parameter 'e' has a 'Status' property (declared as
System.Data.UpdateStatus) which can be set to different
values, e.g.
e.Status = UpdateStatus.SkipCurrentRow
or
e.Status = UpdateStatus.Continue

My question: What is the difference between these two
values? It seems to me that the DataAdapter just moves on
to update the next row regardless of one of these Status
values.

Thanks for any ideas,
Guido
 
Hi Guido,

There's no difference between Continue and SkipCurrentRow in the RowUpdated
event, because the row has been updated when the event is fired. There's
difference in the RowUpdating event. When Continue is set, the current row
will be updated, while SkipCurrentRow is set, the current row won't.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

--------------------
| Content-Class: urn:content-classes:message
| From: "Guido Kraus" <[email protected]>
| Sender: "Guido Kraus" <[email protected]>
| Subject: System.data.UpdateStatus
| Date: Thu, 13 Nov 2003 13:58:22 -0800
| Lines: 25
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOqMUFXWND4LX7QRmCdK7LEYVaYfw==
| Newsgroups: microsoft.public.dotnet.framework.adonet
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:66266
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| Hi,
|
| I use the RowUpdated event of my DataAdapter to response
| to DBConcurrencyExceptions. My event handler looks
| something like this:
|
| Private Sub OnRowUpdated(ByVal sender As Object, _
| ByVal e As OleDb.OleDbRowUpdatedEventArgs)
| '...
| End Sub
|
| The parameter 'e' has a 'Status' property (declared as
| System.Data.UpdateStatus) which can be set to different
| values, e.g.
| e.Status = UpdateStatus.SkipCurrentRow
| or
| e.Status = UpdateStatus.Continue
|
| My question: What is the difference between these two
| values? It seems to me that the DataAdapter just moves on
| to update the next row regardless of one of these Status
| values.
|
| Thanks for any ideas,
| Guido
|
 
Back
Top