On Nov 29, 7:28 pm, Tim Harig <user...@ilthio.net> wrote:
> On 2010-11-29, tinauser <tinau...@libero.it> wrote:
>
> > '''
> > INSERT INTO 'foo' VALUES (?,?)
> > '''
> > ,('NULL','yyy'))
>
> s/'NULL'/None/
>
> > I get a datatype mismatch error.
>
> The sqlite module is smart enough to convert between Python types and
> Sqlite types.  If you pass it 'NULL' it thinks you are passing it a string.
> Python uses None in much the same way that databases use NULL, so the
> module converts None to 'NULL' and vise versa.

Thanks all of you for the fast answers!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to