Werner F. Bruhin wrote:
Hi Kenneth,
Attached some updated files which work as far as I can see.
The corrections/changes needed to make it work:
In addperson.py:
- line 119 and 129, wxMessageDialog needs to be wx.MessageDialog
- line 119 and 129 wxOK needs to be wx.OK
- line 95 (in add) change parms = self.parms to parms = {}
This is really just a work around, as kinterbasdb does seems to support setitem, however as all values are set in parms it does not really make a difference as far as I could see.In manageperson.py:
- line 75 (in close) change from self.Close(1) to self.Destroy(), as self is a wxDialog it needs to be destroyed otherwise program will not close correctly (e.g. in Boa the task will still show on its Tasks tab).In utilities.py:
Both updateperson and enterperson show three coding styles, I am not sure if this is worth the potential confusion.All is attached, inclusive the db as a zip file.
See you
Werner
<snip...>
Werner,
why do you want to show People bad Programming style?
Please stick with the best Solution - use the Drivers capability to
quote the Params for you!
e.g.:
parmtuple = (fname, lname, profession, salutation)
stmt = 'insert into persons (fname,lname,profession,salutation) values (?, ?, ?, ?)'
c.execute(stmt, parmtuple)
I really do not understand why People at all try to do it the hard way.
Uwe