예제 #1
0
        public void Load()
        {
            Version         = (DBFVersion)br.ReadByte();
            UpdateYear      = br.ReadByte();
            UpdateMonth     = br.ReadByte();
            UpdateDay       = br.ReadByte();
            NumberOfRecords = br.ReadInt32();
            HeaderLength    = br.ReadInt16();
            RecordLength    = br.ReadInt16();
            Reserved        = br.ReadBytes(20);

            FieldList = new List <DbfFieldDiscriptor>();
            RecordSet = new List <DbfRecord>();
            while (br.PeekChar() != 0x0d)
            {
                DbfFieldDiscriptor field = new DbfFieldDiscriptor();
                field.Load(ref br);
                FieldList.Add(field);
            }

            br.BaseStream.Position = HeaderLength;

            foreach (DbfFieldDiscriptor field in FieldList)
            {
                DbfRecord record = new DbfRecord(FieldList);
                record.Load(ref br);
                RecordSet.Add(record);
            }
        }
예제 #2
0
 public DBFloat(DbfFieldDiscriptor fd)
 {
     discriptor = fd;
 }
예제 #3
0
 public DBLogical(DbfFieldDiscriptor fd)
 {
     discriptor = fd;
 }
예제 #4
0
 public DBDate(DbfFieldDiscriptor fd)
 {
     discriptor = fd;
 }
예제 #5
0
 public DBCharacter(DbfFieldDiscriptor fd)
 {
     discriptor = fd;
 }
예제 #6
0
 public DBNumeric(DbfFieldDiscriptor fd)
 {
     discriptor = fd;
 }
예제 #7
0
 public DBMemo(DbfFieldDiscriptor fd)
 {
     discriptor = fd;
 }
예제 #8
0
 public static IElement CreateInstance(DbfFieldDiscriptor fd)
 {
     return(Creators[fd.FieldType](fd));
 }