creating new objects with references to them
steve at holdenweb.com
Thu Nov 2 18:58:30 CET 2006
> Steve Holden wrote:
>> del rec
> Hmmm, but what if the record can remain open, changes can be made, and
> then saved again to the same object? I suppose it isn't necessary to
> delete them, right? Man, this stuff gets complicated....
Right. Of course, once you've written a record to the database for the
first time you need a flag to tell you it exists so that further changes
are made with UPDATE statements. But ultimately it's just a matter of
synchronizing the contents of an internal data structure with the
contents of a set of windows (typically dialogs) and a database.
Another option is to use an object-relational mapper like SQLObject or
SQLalchemy to hide most of the database ferkling.
The complexity is known as "real life". Get used to it ;-)
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list