Initializes a new instance of the SQLDataSetCommand class with a select command string and a connection string.
[Visual Basic] Overloads Public Sub New( _ ByVal selectCommandText As String, _ ByVal selectConnectionString As String _ ) [C#] public SQLDataSetCommand( string selectCommandText, string selectConnectionString ); [C++] public: SQLDataSetCommand( String* selectCommandText, String* selectConnectionString ); [JScript] public function SQLDataSetCommand( selectCommandText : String, selectConnectionString : String );
When an instance of SQLDataSetCommand is created, the following read/write properties are set to initial values.
Properties | Initial Value |
---|---|
SelectCommand | A new SQLCommand that has selectConnectionString as its connection text and selectCommandText as its command text. |
InsertCommand | A new SQLCommand that has selectConnectionString as its connection text. |
DeleteCommand | A new SQLCommand that has selectConnectionString as its connection text. |
UpdateCommand | A new SQLCommand that has selectConnectionString as its connection text. |
MissingMappingAction | MissingMappingAction.Passthrough |
MissingSchemaAction | MissingSchemaAction.Add |
You can change the value of any of these properties through a separate call to the property.
The following example creates a SQLDataSetCommand with a select command string and a connection string as parameters.
[Visual Basic]
Sub CreateDataSetCommand () Dim sqlDataSetComm As SQLDataSetCommand Dim mySelectComm As String Dim myConnection As String ' Set myConnection to the connection text myConnection = "Provider=SQLSQL.1;User ID=sa;PASSWORD=;" _ + "Initial Catalog=Northwind;Data Source=vbsql7;" ' Set mySelectComm to the select command text mySelectComm = "SELECT intID, vchFirstName, vchLastName " _ + "FROM Customers" ' Initialize sqlDataSetComm as a new object sqlDataSetComm = new SQLDataSetObject mySelectComm, myConnection End Sub
SQLDataSetCommand Class | SQLDataSetCommand Members | System.Data.SQL Namespace | SQLDataSetCommand Constructor Overload List | MissingMappingAction | MissingSchemaAction