Exemplo n.º 1
0
        public override object GetValue(int ordinal)
        {
            object result = set.getObject(ConvertOrdnal(ordinal));

            result = H2Helper.ConvertToDotNet(result);
            return(result);
        }
        public override object ExecuteScalar()
        {
            CheckConnection();
            EnsureStatment();
            object result = null;

            try
            {
                ResultSet set = statement.executeQuery();
                try
                {
                    if (set.next())
                    {
                        result = set.getObject(1);
                        result = H2Helper.ConvertToDotNet(result);
                    }
                }
                finally
                {
                    set.close();
                }
                return(result);
            }
            catch (org.h2.jdbc.JdbcSQLException ex)
            {
                throw new H2Exception(ex);
            }
        }