Subtle Syntax Error
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
I must have a syntax error when trying to delete a row from table. Here's
the function:
def OnSubPolDel(self, event):
hilite = self.polTree.GetSelection()
gone = self.polTree.GetItemText(hilite)
self.polTree.Delete(hilite)
self.appData.cur.execute("delete from subpolicy where subpol_name = 'gone'")
The selected item in the tree control is removed from view, but not from
the database.
I've looked again at Mike Owens' SQLite book, and the syntax works with
the explicit subpol_name when I test it from within the sqlite3 shell, but
not with the variable name.
It must be a very simple issue that I've missed, and I'd greatly
appreciate a pointer to what I've done incorrectly.
TIA,
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