PgSqlCommand Constructor(String,PgSqlConnection,PgSqlTransaction)
Initializes a new instance of the
PgSqlCommand class with the text of the query, a %% object, and the
PgSqlTransaction.
The following example creates a
PgSqlCommand and sets some of its properties.
public void CreateCommand()
{
PgSqlConnection pgConnection = new PgSqlConnection(
"host=server;database=test;user id=postgres;");
pgConnection.Open();
PgSqlTransaction myTrans = pgConnection.BeginTransaction();
string mySelectQuery = "SELECT * FROM Test.Dept";
PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery, pgConnection,myTrans);
pgCommand.FetchSize = 100
}
Public Sub CreateCommand()
Dim pgConnection As New PgSqlConnection( _
"host=server;database=test;user id=postgres;")
pgConnection.Open()
Dim myTrans As PgSqlTransaction = pgConnection.BeginTransaction()
Dim mySelectQuery As String = _
"SELECT * FROM Test.Dept"
Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection, myTrans)
pgCommand.FetchSize = 100
End Sub