PySQLite Problem

Tim Roberts timr at probo.com
Sat May 10 01:26:21 EDT 2003


alc at PublicPropertySoftware.com wrote:

>I'm doing some work with PySQLite, and pretty good results
>for quite some time, no problems at all.  Then, today I
>hit this one.  The code reads roughly:
>...
>The nodesequence and  node fields are integer, and the 
>others are strings. Problem happens when newTitle 
>contains unpaired tick marks, as in e.g. O'Reilly.  This 
>throws an exception in PySQLite with a format error for 
>the SQL. 
>...
>Is there any better solution than to use the tick marks and 
>wrap all my calls to PySQLite to double the ticks on the way
>in and undouble them on the way out?

No.  That's exactly the right way to do it.

>TIA for not laughing.

Not at all.  This is a real issue when doing SQL from within a programming
languange.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.




More information about the Python-list mailing list