private void BuildSchemaInfo()
 {
     int fieldCount = this._reader.FieldCount;
     string[] columnNameArray = new string[fieldCount];
     for (int i = 0; i < fieldCount; i++)
     {
         columnNameArray[i] = this._reader.GetName(i);
     }
     ADP.BuildSchemaTableInfoTableNames(columnNameArray);
     SchemaInfo[] infoArray = new SchemaInfo[fieldCount];
     PropertyDescriptor[] properties = new PropertyDescriptor[this._reader.FieldCount];
     for (int j = 0; j < infoArray.Length; j++)
     {
         SchemaInfo info = new SchemaInfo {
             name = this._reader.GetName(j),
             type = this._reader.GetFieldType(j),
             typeName = this._reader.GetDataTypeName(j)
         };
         properties[j] = new DbColumnDescriptor(j, columnNameArray[j], info.type);
         infoArray[j] = info;
     }
     this._schemaInfo = infoArray;
     this._fieldNameLookup = new FieldNameLookup(this._reader, -1);
     this._descriptors = new PropertyDescriptorCollection(properties);
 }
		internal DbDataRecord (SchemaInfo[] schema, object[] values, FieldNameLookup lookup)
		{
			this.schema = schema;
			this.lookup = lookup;
			this.values = values;
			this.fieldCount = values.Length;
		}
 internal DataRecordInternal(SchemaInfo[] schemaInfo, object[] values, PropertyDescriptorCollection descriptors, FieldNameLookup fieldNameLookup)
 {
     this._schemaInfo = schemaInfo;
     this._values = values;
     this._propertyDescriptors = descriptors;
     this._fieldNameLookup = fieldNameLookup;
 }
        private FieldNameLookup _fieldNameLookup; // MDAC 69015

        // copy all runtime data information
        internal DataRecordInternal(SchemaInfo[] schemaInfo, object[] values, PropertyDescriptorCollection descriptors, FieldNameLookup fieldNameLookup) {
            Debug.Assert(null != schemaInfo, "invalid attempt to instantiate DataRecordInternal with null schema information");
            Debug.Assert(null != values, "invalid attempt to instantiate DataRecordInternal with null value[]");
            _schemaInfo = schemaInfo;
            _values = values;
            _propertyDescriptors = descriptors;
            _fieldNameLookup = fieldNameLookup;
        }
Beispiel #5
0
 // copy all runtime data information
 internal DataRecordInternal(SchemaInfo[] schemaInfo, object[] values, BasicFieldNameLookup fieldNameLookup)
 {
     Debug.Assert(null != schemaInfo, "invalid attempt to instantiate DataRecordInternal with null schema information");
     Debug.Assert(null != values, "invalid attempt to instantiate DataRecordInternal with null value[]");
     _schemaInfo = schemaInfo;
     _values = values;
     _fieldNameLookup = fieldNameLookup;
 }
Beispiel #6
0
		private static SchemaInfo[] LoadSchema (IDataReader reader)
		{
			int fieldCount = reader.FieldCount;
			SchemaInfo[] schema = new SchemaInfo [fieldCount];

			for(int i=0; i < fieldCount; i++) {
				SchemaInfo columnSchema = new SchemaInfo ();

				columnSchema.ColumnName = reader.GetName(i);
				columnSchema.ColumnOrdinal = i; 
				columnSchema.DataTypeName = reader.GetDataTypeName (i);
				columnSchema.FieldType = reader.GetFieldType (i);

				schema [i] = columnSchema;
			}

			return schema;
		}
Beispiel #7
0
        private void BuildSchemaInfo()
        {
            int count = _reader.FieldCount;
            string[] fieldnames = new string[count];
            for (int i = 0; i < count; ++i)
            {
                fieldnames[i] = _reader.GetName(i);
            }
            ADP.BuildSchemaTableInfoTableNames(fieldnames);

            SchemaInfo[] si = new SchemaInfo[count];
            for (int i = 0; i < si.Length; i++)
            {
                SchemaInfo s = new SchemaInfo();
                s.name = _reader.GetName(i);
                s.type = _reader.GetFieldType(i);
                s.typeName = _reader.GetDataTypeName(i);
                si[i] = s;
            }

            _schemaInfo = si;
            _fieldNameLookup = new FieldNameLookup(_reader, -1);
        }
        private void BuildSchemaInfo() {
            int count = _reader.FieldCount;
            string[] fieldnames = new string[count];
            for (int i = 0; i < count; ++i) {
                fieldnames[i] = _reader.GetName(i);
            }
            ADP.BuildSchemaTableInfoTableNames(fieldnames); // MDAC 71401

            SchemaInfo[] si = new SchemaInfo[count];
            PropertyDescriptor[] props = new PropertyDescriptor[_reader.FieldCount];
            for (int i = 0; i < si.Length; i++) {
                SchemaInfo s = new SchemaInfo();
                s.name = _reader.GetName(i);
                s.type = _reader.GetFieldType(i);
                s.typeName = _reader.GetDataTypeName(i);
                props[i] = new DbColumnDescriptor(i, fieldnames[i], s.type);
                si[i] = s;
            }

            _schemaInfo = si;
            _fieldNameLookup = new FieldNameLookup(_reader, -1); // MDAC 71470
            _descriptors = new PropertyDescriptorCollection(props);
        }
 internal void SetSchemaInfo(SchemaInfo[] schemaInfo) {
     Debug.Assert(null == _schemaInfo, "invalid attempt to override DataRecordInternal schema information");
     _schemaInfo = schemaInfo;
 }
Beispiel #10
0
		// FIXME: this class should actually be reimplemented to be one
		// of the derived classes of DbDataRecord, which should become
		// almost abstract.
		internal DbDataRecordImpl (SchemaInfo[] schema, object[] values)
		{
			this.schema = schema;
			this.values = values;
			this.fieldCount = values.Length;
		}
		public DbDataRecord (SchemaInfo[] schemaInfo, object[] values, PropertyDescriptorCollection descriptors, FieldNameLookup fieldNameLookup)
		{
		}
		public void SetSchemaInfo (SchemaInfo[] schemaInfo)
		{
			throw new NotImplementedException ();
		}
		private void LoadSchema ()
		{
			schema = new SchemaInfo [fieldCount];

			for(int i=0; i < fieldCount; i++) {
				SchemaInfo columnSchema = new SchemaInfo ();
				
				lookup.Add (reader.GetName(i));

				columnSchema.ColumnName = reader.GetName(i);
				columnSchema.ColumnOrdinal = i; 
				columnSchema.DataTypeName = reader.GetDataTypeName (i);
				columnSchema.FieldType = reader.GetFieldType (i);

				schema [i] = columnSchema;
			}
		}
 internal void SetSchemaInfo(SchemaInfo[] schemaInfo)
 {
     this._schemaInfo = schemaInfo;
 }