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