Re: DELETE Statement Apparently Not Working
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2 Oct 2007, Adrian Klaver wrote:
> Several questions/steps.
> 1) The row you want to delete actually exists in the database?
> Not finding a row to delete is not an error just a non-op.
Adrian,
Yes, it does. It's the currently displayed variable, and I can select it
(and delete it) using the sqlite3 shell.
> 2) As I mentioned previously are you sure that everything about the values
> being supplied to the where clause is the same as the values in the database?
Yes. The print statements confirm that. Those strings are what are passed
to the delete statement.
> 3) Set up a simplified test case. I usually drop into ipython and hardwire an
> SQL statement with values I know will work.
I tested with the sqlite3 shell, but I'll try ipython in the morning.
> 4) I usually find I have fewer problems if I use one of pysqlites parameter
> styles. I prefer the named version. Ex: name=:name and comp_name=:comp_name',
> {'name':self.vname.GetValue(),'comp_name':self.vcomp.GetValue()}
I don't follow the above. Where can I read about pysqlite's parameter
styles?
Thanks,
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