'Declaration Public Shadows Property Connection As PgSqlConnection
public new PgSqlConnection Connection {get; set;}
'Declaration Public Shadows Property Connection As PgSqlConnection
public new PgSqlConnection Connection {get; set;}
PgSqlConnection specified in this property will carry out all operations executed with this PgSqlCommand.
This property supports the InterForm technology.
A single PgSqlConnection can be used by many PgSqlCommand objects on the assumption that all operations will be done consecutively. In other words, you can not execute an SQL statement while an asynchronous operation is in progress.
public void CreateCommand() { string mySelectQuery = "SELECT * FROM Test.Dept ORDER BY DeptNo"; PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery); pgCommand.Connection = new PgSqlConnection( "host=server;database=test;user id=postgres;"); pgCommand.CommandType = System.Data.CommandType.Text; }
Public Sub CreateCommand() Dim mySelectQuery As String = _ "SELECT * FROM Test.Dept ORDER BY DeptNo" Dim pgCommand As New PgSqlCommand(mySelectQuery) pgCommand.Connection = New PgSqlConnection( _ "host=server;database=test;user id=postgres;") pgCommand.CommandType = System.Data.CommandType.Text End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2