Initializes a new instance of the SQLDataSetCommand class.
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();
Initializes a new instance of the SQLDataSetCommand class with the specified select command.
[Visual Basic] Overloads Public Sub New(SQLCommand)
[C#] public SQLDataSetCommand(SQLCommand);
[C++] public: SQLDataSetCommand(SQLCommand*);
[JScript] public function SQLDataSetCommand(SQLCommand);
Initializes a new instance of the SQLDataSetCommand class with a select command string and a connection string.
[Visual Basic] Overloads Public Sub New(String, String)
[C#] public SQLDataSetCommand(String, String);
[C++] public: SQLDataSetCommand(String*, String*);
[JScript] public function SQLDataSetCommand(String, String);
Inintializes a new instance of the SQLDataSetCommand class with a select command string and a SQLConnection object.
[Visual Basic] Overloads Public Sub New(String, SQLConnection)
[C#] public SQLDataSetCommand(String, SQLConnection);
[C++] public: SQLDataSetCommand(String*, SQLConnection);
[JScript] public function SQLDataSetCommand(String, SQLConnection);
The following example creates a SQLDataSetCommand with a select command string and a SQLConnection as parameters.
Note This example shows how to use one of the overloaded version of the SQLDataSetCommand constructor. For other examples that may be available, see the individual overload topics.
[Visual Basic]
Sub CreateDataSetCommand () Dim sqlDataSetComm As SQLDataSetCommand Dim mySelectComm As String Dim myConnection As String Dim mySQLConnect As SQLConnection ' 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 mySQLConnect as a new object mySQLConnect = New SQLConnection myConnection ' Initialize sqlDataSetComm as a new object sqlDataSetComm = new SQLDataSetObject mySelectComm, mySQLConnect ' Set the action to take when a table or column is missing sqlDataSetComm.MissingSchemaAction = MissingSchemaAction.Add End Sub
SQLDataSetCommand Class | SQLDataSetCommand Members | System.Data.SQL Namespace