'Declaration Public Shadows Function CreateCommand() As PgSqlCommand
public new PgSqlCommand CreateCommand()
Return Value
A PgSqlCommand object.
'Declaration Public Shadows Function CreateCommand() As PgSqlCommand
public new PgSqlCommand CreateCommand()
public void CreatePgSqlCommand(string myConnString) { PgSqlConnection pgConnection = new PgSqlConnection(myConnString); PgSqlCommand pgCommand = pgConnection.CreateCommand(); pgCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"; pgConnection.Open(); try { pgCommand.ExecuteNonQuery(); } finally { pgConnection.Close(); } }
Public Sub CreatePgSqlCommand(ByVal myConnString As String) Dim pgConnection As New PgSqlConnection(myConnString) Dim pgCommand As PgSqlCommand = pgConnection.CreateCommand() pgCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')" pgConnection.Open() Try pgCommand.ExecuteNonQuery() Finally pgConnection.Close() End Try 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