Re: DELETE Statement Apparently Not Working

Adrian Klaver <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Wednesday 03 October 2007 6:56 am, Rich Shepard wrote:
> 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
Glad it worked out. In your original post you mentioned wanting to set up 
cascading deletes . You might find the URL below helpful.
http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers
-- 
Adrian Klaver
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.