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 Constructor ()

Initializes a new instance of the ADODataSetCommand class. This is the default constructor.

[Visual Basic]
Overloads Public Sub New()
[C#]
public ADODataSetCommand();
[C++]
public: ADODataSetCommand();
[JScript]
public function ADODataSetCommand();

Remarks

When you create an instance of ADODataSetCommand, the following read/write properties are set to initial values.

Properties Initial Value
SelectCommand A new ADOCommand.
InsertCommand A new ADOCommand.
DeleteCommand A new ADOCommand.
UpdateCommand A new ADOCommand.
MissingMappingAction MissingMappingAction.Passthrough
MissingSchemaAction MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Example [Visual Basic]

The following example shows how to create the ADODataSetCommand.

[Visual Basic]

Sub CreateDataSetCommand ()
    Dim adoDataSetComm As ADODataSetCommand
    Dim myInsertComm As String
    Dim mySelectComm As String
    ' Initialize adoDataSetComm as a new object
    adoDataSetComm = New ADODataSetCommand
    ' Set mySelectComm to the text of the select command
    mySelectComm = "SELECT intID, vchFirstName, vchLastName " _
     + "FROM Customers"
    ' Set the adoDataSetComm Select Command text
    adoDataSetComm.SelectCommand.CommandText = mySelectComm
    ' Set myInsertComm to the text of the insert command
    myInsertComm = "INSERT INTO tblCustomer (vchFirstName, " _
     + "vchLastName) VALUES (?, ?)"
    ' Set the adoDataSetComm Insert Command text
    adoDataSetComm.InsertCommand.CommandText = myInsertComm
    ' Set the action to take when a table or column is missing
    adoDataSetComm.MissingSchemaAction = MissingSchemaAction.Add
End Sub

See Also

ADODataSetCommand Class | ADODataSetCommand Members | System.Data.ADO Namespace | ADODataSetCommand Constructor Overload List | MissingMappingAction | MissingSchemaAction