asp.net.ph

SqlDataAdapter.OnRowUpdating Method ( RowUpdatingEventArgs )

System.Data.SqlClient Namespace   SqlDataAdapter Class


Raises the RowUpdating event.

[ VB ]
Overloads Overrides Protected Sub OnRowUpdating ( _
   ByVal ruevent As RowUpdatingEventArgs _
)

[ C# ]
Protected override void OnRowUpdating (
   RowUpdatingEventArgs ruevent
);

[ C++ ]
protected: void OnRowUpdating (
   RowUpdatingEventArgs* ruevent
);

[ JScript ]
Protected override function OnRowUpdating (
   ruevent : RowUpdatingEventArgs
);

Parameters

ruevent
An SQLRowUpdatingEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Providing Event Functionality.

Notes to Inheritors: When overriding OnRowUpdating in a derived class, be sure to call the base class's OnRowUpdating method.

Example

The following example [ B ] uses this method within a derived class.

[ VB ] 
' myAdapter.class derived from SqlDataAdapter
Inherits SqlDataAdapter
' create the method for row updated
Public Sub OnRowUpdated ( event As RowUpdatedEventArgs )
   ' show a message box telling user of row update
   Dim myMsgBox As MessageBox
   myMsgBox.Show "A row has been updated."
   '  call the base class method
   MyBase.OnRowUpdated event
End Sub
' create the method for row updating
Public Sub OnRowUpdating ( event As RowUpdatingEventArgs )
   ' show a message box telling user of row update
   Dim myMsgBox As MessageBox
   myMsgBox.Show "A row is being updated ..."
   '  call the base class method
   MyBase.OnRowUpdating event
End Sub
' create the method for the schema changing
Public Sub OnSchemaChanging ( event As SchemaChangingEventArgs )
   ' show a message box telling user of schema change
   Dim myMsgBox As MessageBox
   myMsgBox.Show "the schema is changing ..."
   '  call the base class method
   MyBase.OnSchemaChanging event
End Sub
' create the method for the schema changed
Public Sub OnSchemaChanged ( event As SchemaChangedEventArgs )
   ' show a message box telling user of schema change
   Dim myMsgBox As MessageBox
   myMsgBox.Show "the schema has changed"
   '  call the base class method
   MyBase.OnSchemaChanged event
End Sub
' create the method for the schema being mapped
Public Sub OnSchemaMapping ( event As SchemaMappingEventArgs )
   ' show a message box telling the user of schema map
   Dim myMsgBox As MessageBox
   myMsgBox.Show "the schema is currently being mapped ..."
   ' call the base class method
   MyBase.OnSchemaMapping event
End Sub
See Also

SqlDataAdapter Members   SqlDataAdapter.OnRowUpdating Overload List   OnRowUpdated Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph