SqlCommand Constructor(String)
Initializes a new instance of the
SqlCommand class with the text of the query.
The following example creates a
SqlCommand and sets some of its properties.
|
|---|
public void CreateSqlCommand()
{
string mySelectQuery = "SELECT * FROM Test.Dept";
SqlCommand myCommand = new SqlCommand(mySelectQuery);
myCommand.FetchSize = 100;
} |
|
|---|
Public Sub CreateSqlCommand()
Dim mySelectQuery As String = "SELECT * FROM Test.Dept"
Dim myCommand As New SqlCommand(mySelectQuery)
myCommand.FetchSize = 100
End Sub |