Exemplo n.º 1
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;
        }
Exemplo n.º 2
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;
        }