Parameters
- i
Return Value
The value of the specified column.
Call IsDBNull to check for null values before calling this method.
static void GetMyInt32(PgSqlConnection myConnection) { PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes"); cmd.Connection = myConnection; myConnection.Open(); try { PgSqlDataReader reader = cmd.ExecuteReader(); reader.Read(); int recievedInt = reader.GetInt32(reader.GetOrdinal("Int32Col")); reader.Close(); } finally { myConnection.Close(); } }