dbfpy - cannot store new record

L

Laszlo Nagy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top