Re: Error Explanation/Referential Integrity Question
[email protected] (Adrian Klaver)
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <100120072033.28928.4701599800061C1C0000710022058861729D0A900E04050E@comcast.net> |
-------------- Original message ---------------------- From: Rich Shepard <[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 I think you are going to need to show us the portion of the code that refers to 'wxComboBox'. My guess is that it is a problem with how self.vname is generated. -- Adrian Klaver [email protected]