Error Explanation/Referential Integrity Question
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
I tried deleting a selected record using this syntax:
def OnDel(self, event):
self.appData.cur.execute ("DELETE from Variable where name = '%s'" % self.vname)
self.appData.con.commit()
and python complained
Traceback (most recent call last):
File "/data1/eikos/variablePage.py", line 547, in OnDel
self.appData.cur.execute ("DELETE from Variable where name = '%s'" % self.vname)
pysqlite2.dbapi2.OperationalError: near "wxComboBox": syntax error
The row I want to delete is the text ctrl portion of the wx.ComboBox, not
in the list portion. How do I learn just what the syntax error is on this
operation?
On the topic of deleting records, I have a hierarchy of related tables and
need to implement DELETE triggers for them. My assumption is that each table
needs a trigger for the one immediately referenced by it, so I need a
cascade of triggers working down the hierarchy. For example, if table foo
has rows with details for each in table bar, and the rows in table bar have
foreign key related rows in table baz, then I need to create a trigger on
foo that checks for rows on bar, a trigger on bar that checks for rows on
baz, then delete the applicable rows working my way up the hierarchy. Is
this correct?
Regardless, until I figure out what 'wxComboBox' syntax error means, I'm
stymied.
Rich
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerators(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863