Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
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 BasicFieldNameLookup(_reader);
        }