NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ADODataSetCommand.OnSchemaMapping (ADOSchemaMappingEventArgs)

Raises the OnSchemaMapping event.

[Visual Basic]
Overloads Overridable Protected Sub OnSchemaMapping( _
   ByVal scevent As ADOSchemaMappingEventArgs _
)
[C#]
protected virtual void OnSchemaMapping(
   ADOSchemaMappingEventArgs scevent
);
[C++]
protected: virtual void OnSchemaMapping(
   ADOSchemaMappingEventArgs* scevent
);
[JScript]
protected function OnSchemaMapping(
   scevent : ADOSchemaMappingEventArgs
);

Parameters

scevent
A ADOSchemaMappingEventArgs that contains the event data.

Remarks

Raising an event invokes the event-handling method through a delegate. For an overview, see TBD.

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

Example [Visual Basic]

The following example uses this method within a derived class.

[Visual Basic]

' MyDataSetCommand.class derived from ADODataSetCommand
Inherits ADODataSetCommand
' 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

ADODataSetCommand Class | ADODataSetCommand Members | System.Data.ADO Namespace | ADODataSetCommand.OnSchemaMapping Overload List