Esempio n. 1
0
        public void LookupDesc()
        {
            using (StatementBase lookup = DB.CreateStatement(Transaction))
            {
                lookup.Prepare(GetArrayDesc());
                lookup.Execute();

                _descriptor = new ArrayDesc();
                DbValue[] values = lookup.Fetch();
                if (values != null && values.Length > 0)
                {
                    _descriptor.RelationName = _tableName;
                    _descriptor.FieldName    = _fieldName;
                    _descriptor.DataType     = values[0].GetByte();
                    _descriptor.Scale        = values[1].GetInt16();
                    _descriptor.Length       = values[2].GetInt16();
                    _descriptor.Dimensions   = values[3].GetInt16();
                    _descriptor.Flags        = 0;

                    _rdbFieldName = values[4].GetString().Trim();
                }
                else
                {
                    throw new InvalidOperationException();
                }
            }
        }
Esempio n. 2
0
        public void LookupDesc()
        {
            // Initializa array descriptor information
            this.descriptor = new ArrayDesc();

            // Create statement for retrieve information
            StatementBase lookup = this.DB.CreateStatement(this.Transaction);

            lookup.Prepare(this.GetArrayDesc());
            lookup.Execute();

            DbValue[] values = lookup.Fetch();
            if (values != null && values.Length > 0)
            {
                this.descriptor.RelationName = tableName;
                this.descriptor.FieldName    = fieldName;
                this.descriptor.DataType     = values[0].GetByte();
                this.descriptor.Scale        = values[1].GetInt16();
                this.descriptor.Length       = values[2].GetInt16();
                this.descriptor.Dimensions   = values[3].GetInt16();
                this.descriptor.Flags        = 0;

                this.rdbFieldName = values[4].GetString().Trim();
            }
            else
            {
                throw new InvalidOperationException();
            }

            lookup.Release();
            lookup = null;
        }
Esempio n. 3
0
        public void LookupBounds()
        {
            this.LookupDesc();

            StatementBase lookup = this.DB.CreateStatement(this.Transaction);

            lookup.Prepare(this.GetArrayBounds());
            lookup.Execute();

            int i = 0;

            this.descriptor.Bounds = new ArrayBound[16];
            DbValue[] values;

            while ((values = lookup.Fetch()) != null)
            {
                this.descriptor.Bounds[i].LowerBound = values[0].GetInt32();
                this.descriptor.Bounds[i].UpperBound = values[1].GetInt32();

                i++;
            }

            lookup.Release();
            lookup = null;
        }
Esempio n. 4
0
        public void LookupBounds()
        {
            LookupDesc();

            using (StatementBase lookup = DB.CreateStatement(Transaction))
            {
                lookup.Prepare(GetArrayBounds());
                lookup.Execute();

                _descriptor.Bounds = new ArrayBound[16];
                DbValue[] values;
                int       i = 0;
                while ((values = lookup.Fetch()) != null)
                {
                    _descriptor.Bounds[i].LowerBound = values[0].GetInt32();
                    _descriptor.Bounds[i].UpperBound = values[1].GetInt32();

                    i++;
                }
            }
        }