Npgsql API Documentation |

# NpgsqlCommand Constructor (String, NpgsqlConnection)

[This is preliminary documentation and subject to change.]

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

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

#### Parameters

cmdText
  The text of the query.
connection
  A NpgsqlConnection that represents the connection to a PostgreSQL server.

#### See Also

NpgsqlCommand Class | Npgsql Namespace | NpgsqlCommand Constructor Overload List