Menu

#95 Restructure bug?

Win32/Linux
open
nobody
restructure (1)
5
2022-02-20
2018-12-16
No

Is there a bug in dbf_dbffile.pas, line 1344? If I add new field and try to restructure file, I get an error message. If this line is changed to TempSrcDef := DestFieldDefs.Items[lFieldNo]; then restructure is working fine.

Discussion

  • Paul Baker

    Paul Baker - 2018-12-20

    Can you post a short program that reproduces this? As simple as you can, please.

     
  • Damir Šimunović

    Suppose you have existing table Dbf1. This is the procedure in short:
    var dbff : TDbfFieldDefs;
    Dbf1.Open;
    dbff.Assign(Dbf1.DbfFieldDefs);
    ft := TFieldType(leType.Tag);
    dbff.Add(leFieldName.Text,ft,len);
    Dbf1.Close;
    Dbf1.RestructureTable(dbff,true);
    Dbf1.Open;
    I was using such procedure for years with old version 6.4.7 of TDbf in D2007.

     
    • Paul Baker

      Paul Baker - 2022-02-20

      Does this happen with latest snapshot, currently revision 803, from https://sourceforge.net/p/tdbf/code/HEAD/tree/? If so, please confirm code needed to reproduce it and what the error message is.

       

Log in to post a comment.