Design Suggestions
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
To avoid reinventing the wheel, I'll assume that someone here has already addressed this need and I can benefit from that experience. My application has a wxPython notebook page with 15 widgets. The values of 14 of them depend on the value of the first widget. The first widget is a combo box in which I want all values to be loaded when a project database is opened. When the user makes a selection from that combo box, the values of the other widgets will be updated so that the entire record is displayed. What I've done so far is retrieve all records from the pertinent table into a list of tuples, using cur.fetchall(). There may be a few hundred records in that table. If, instead, I use cur.fetchone(), then go row-by-row to load only the first data field (after the rowid) into the combo box widget, is this more efficient? I could then retrieve the single row to display all values for the selected variable. Suggestions appreciated. Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863