dbfpy - cannot store new record

Laszlo Nagy gandalf at shopzeus.com
Thu May 21 07:25:04 EDT 2009


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




More information about the Python-list mailing list