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:
> My concern is that there are spaces in the variable strings that aren't
> showing up in the print statements but are affecting the comparison to the
> values in the database.
Adrian,
Ah, yes! Very subtle. I was tripped up before by an invisible trailing
space, but this time it was different.
If there is no displayed value for the widget named vsub, the value is
blank, that is '', but apparently that's not what the pysqlite cursor saw.
Actually, I've no idea what it saw because printing the value of that widget
displayed nothing visible.
However, by adding the following test I fixed the problem:
if len(self.vsub.GetValue()) == 1:
self.vsub.SetValue('')
> http://initd.org/pub/software/pysqlite/doc/usage-guide.html
> See 1.4 Extensions and Caveats section on the Cursor class.
I'll read that.
Thank you,
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