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!

SQLDataSetCommand Constructor ()

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

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

Remarks

When an instance of SQLDataSetCommand is created, the following read/write properties are set to initial values.

Properties Initial Value
SelectCommand A new SQLCommand.
InsertCommand A new SQLCommand.
DeleteCommand A new SQLCommand.
UpdateCommand A new SQLCommand.
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 creates a SQLDataSetCommand.

[Visual Basic]

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

See Also

SQLDataSetCommand Class | SQLDataSetCommand Members | System.Data.SQL Namespace | SQLDataSetCommand Constructor Overload List | MissingMappingAction | MissingSchemaAction