Parameters
- i
Return Value
The value of the specified column.
Call IsDBNull to check for null values before calling this method.
static void GetMyInt64(SqlConnection myConnection) { SqlCommand cmd = new SqlCommand("SELECT * FROM Test.AllTypes"); cmd.Connection = myConnection; myConnection.Open(); try { SqlDataReader reader = cmd.ExecuteReader(); reader.Read(); long recievedLong = reader.GetInt64(reader.GetOrdinal("Int64Col")); reader.Close(); } finally { myConnection.Close(); } }