|
From: Micha N. <md...@us...> - 2004-08-31 14:26:06
|
Update of /cvsroot/tdbf/tdbf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4382 Modified Files: dbf_dbffile.pas history.txt Log Message: - fixed: only support 65535 length character fields for foxpro (otherwise ms excel generated files can not be read) Index: history.txt =================================================================== RCS file: /cvsroot/tdbf/tdbf/history.txt,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** history.txt 31 Aug 2004 13:34:57 -0000 1.73 --- history.txt 31 Aug 2004 14:25:55 -0000 1.74 *************** *** 42,45 **** --- 42,47 ---- - fixed: opening dbf file with numeric integer field misreads numbers - fixed: storage of foxpro binary integer field + - fixed: only support 65535 length character fields for foxpro + (otherwise ms excel generated files can not be read) Index: dbf_dbffile.pas =================================================================== RCS file: /cvsroot/tdbf/tdbf/dbf_dbffile.pas,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dbf_dbffile.pas 31 Aug 2004 13:34:56 -0000 1.6 --- dbf_dbffile.pas 31 Aug 2004 14:25:55 -0000 1.7 *************** *** 633,640 **** lSize := lFieldDef.Size; lPrec := lFieldDef.Precision; ! if lFieldDef.NativeFieldType = 'C' then begin ! lPrec := lSize div 256; ! lSize := lSize mod 256; end; --- 633,640 ---- lSize := lFieldDef.Size; lPrec := lFieldDef.Precision; ! if (FDbfVersion = xFoxPro) and (lFieldDef.NativeFieldType = 'C') then begin ! lPrec := lSize shr 8; ! lSize := lSize and $FF; end; *************** *** 843,847 **** // apply field transformation tricks ! if lNativeFieldType = 'C' then begin lSize := lSize + lPrec shl 8; --- 843,847 ---- // apply field transformation tricks ! if (lNativeFieldType = 'C') and (FDbfVersion = xFoxPro) then begin lSize := lSize + lPrec shl 8; |