示例#1
0
        /// <summary>
        /// Test CUBRIDDataReader GetOid() method
        /// </summary>
        private static void Test_OID_Get()
        {
            using (CUBRIDConnection conn = new CUBRIDConnection())
            {
                conn.ConnectionString = TestCases.connString;
                conn.Open();

                string sql = "select * from nation limit 1";
                using (CUBRIDCommand cmd = new CUBRIDCommand(sql, conn))
                {
                    using (CUBRIDDataReader reader = (CUBRIDDataReader)cmd.ExecuteReader())
                    {
                        reader.Read();
                        CUBRIDOid oid = reader.GetOid();
                        Debug.Assert(oid.ToString() == "OID:@0|0|0");
                    }
                }
            }
        }