Re: Ensuring Text Is Quoted On Insertion

Adrian Klaver <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Monday 20 November 2006 03:59 pm, Rich Shepard wrote:
> On Mon, 20 Nov 2006, Adrian Klaver wrote:
> > cur.execute(insertStatement,('wetlands','quantity','qn1','if size is
> > large,then value is increased'))
>
> Adrian,
>
>    This works when the strings are defined and constant. However, in the
> application they are not. Each row of the wx.ListCtrl() has distinct values
> for each of the four columns, and each set of four constitutes a record to
> be inserted into the database.
>
> Rich

Alright, looking at your original post I am going to assume pName,sName,rNo 
and rTxt map to the above strings. If that is the case then do
cur.execute(insertStatement,(pName,sName,rNo,rTxt))
-- 
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.