Npgsql API Documentation |

# NpgsqlCommand Constructor (String, NpgsqlConnection, NpgsqlTransaction)

[This is preliminary documentation and subject to change.]

Initializes a new instance of the NpgsqlCommand class with the text of the query, a NpgsqlConnection, and the NpgsqlTransaction.

[Visual Basic]
Overloads Public Sub New( _
ByVal cmdText As String, _
ByVal connection As NpgsqlConnection, _
ByVal transaction As NpgsqlTransaction _
)
[C#]
public NpgsqlCommand(
string cmdText,
NpgsqlConnection connection,
NpgsqlTransaction transaction
);

#### Parameters

cmdText
  The text of the query.
connection
  A NpgsqlConnection that represents the connection to a PostgreSQL server.
transaction
  The NpgsqlTransaction in which the NpgsqlCommand executes.

#### See Also

NpgsqlCommand Class | Npgsql Namespace | NpgsqlCommand Constructor Overload List