SQLiteCommand Constructor(String,SQLiteConnection,SQLiteTransaction)
Initializes a new instance of the
SQLiteCommand class with the text of the query, a
SQLiteConnection object, and the
SQLiteTransaction.
The following example creates a
SQLiteCommand and sets some of its properties.
|
|---|
public void CreateCommand()
{
SQLiteConnection sqLiteConnection = new SQLiteConnection(
"DataSource=mydatabase.db;");
sqLiteConnection.Open();
SQLiteTransaction myTrans = sqLiteConnection.BeginTransaction();
string mySelectQuery = "SELECT * FROM Dept";
SQLiteCommand sqLiteCommand = new SQLiteCommand(mySelectQuery, sqLiteConnection,myTrans);
sqLiteCommand.FetchSize = 100
} |
|
|---|
Public Sub CreateCommand()
Dim sqLiteConnection As New SQLiteConnection( _
"DataSource=mydatabase.db;")
sqLiteConnection.Open()
Dim myTrans As SQLiteTransaction = sqLiteConnection.BeginTransaction()
Dim mySelectQuery As String = _
"SELECT * FROM Dept"
Dim sqLiteCommand As New SQLiteCommand(mySelectQuery, sqLiteConnection, myTrans)
sqLiteCommand.FetchSize = 100
End Sub |