Hi, Try not opening the file in append mode (no "a+")
Inside the logic, there is already a seek to the end of the file and the record counters at the start of the file need updating too. Regards David On Thu, 21 May 2009 13:25:04 +0200, Laszlo Nagy <gand...@shopzeus.com> wrote: > Given this example program: > > import dbfpy > def dbf_open(tblname): > fpath = os.path.join(local.DB_DIR,tblname) > f = file(fpath,"ab+") > f.seek(0) > tbl = dbf.Dbf(f) > return tbl > > tbl = dbf_open("partners.dbf") > rec = tbl.newRecord() > rec["FIELDNAME1"] = 1 > rec["FIELDNAME2"] = "Somebody" > rec.store() > tbl.close() > > I get no exception, no error etc. But the new record is NOT appended to > the table. What is wrong here? > > Thanks, > > Laszlo -- http://mail.python.org/mailman/listinfo/python-list