[Tutor] sqlite3 Python25 parameter binding problem with UPDATEplease help

Alan Gauld alan.gauld at btinternet.com
Tue Dec 2 09:55:17 CET 2008


"aivars" <aivars868 at gmail.com> wrote

> oCon.execute("UPDATE rezerve SET latusaldo =? where gads 
> =?;",(result, [year]))
> oCon.commit()
>
> it throws me the error:
> sqlite3.InterfaceError: error binding parameter 1 probably 
> unsupported type

I assume its the [year] value it objects to.
I'm not sure what you expect SQLite to do with a list as a value, it 
does
not support a list type field.

> All works OK when using INSERT with the same parameters.

Are you sure? You can insert a list into a field?

> Maybe I should as this question on sqlite list?

Perhaps but I think it is the list parameter that it doesn't like.
Unless I misunderstand the syntax.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list