UniCommand Constructor(String,UniConnection)
Initializes a new instance of the
UniCommand class with the text of the query and a %% object.
The following example creates a
UniCommand and sets some of its properties.
|
|---|
public void CreateCommand()
{
UniConnection myConnection = new UniConnection("Provider=SQL Server;Data Source=SERVER;Initial Catalog=Northwind;User ID=sa");
string mySelectQuery = "SELECT * FROM Test.Dept";
UniCommand myCommand = new UniCommand(mySelectQuery, myConnection);
myCommand.FetchSize = 100;
} |
|
|---|
Public Sub CreateCommand()
Dim myConnection As New UniConnection _
("Provider=SQL Server;Data Source=SERVER;Initial Catalog=Northwind;User ID=sa")
Dim mySelectQuery As String = _
"SELECT * FROM Test.Dept"
Dim myCommand As New UniCommand(mySelectQuery, myConnection)
myCommand.FetchSize = 100
End Sub |