the question mark is the indicator for a bound value.
Escape it, I think like this
> toDo ="Update ex set amount = '?' where ex_id = 1"
or
> toDo ="Update ex set amount = '\?' where ex_id = 1"

On 11/11/05, Dan McDaniel <[EMAIL PROTECTED]> wrote:
> I am trying following a simple example shown in one of
> the online tutorials on pysqlite.
> The example shows how to input a value using qmarks in
> the statement. I am getting an error message
> like"Incorrect number of bindings supplied. The
> current statement uses 1, and there are -1 supplied."
> my code is:
>
> from pysqlite2 import dbapi2 as sqlite
>
> con = sqlite.connect("mydb.db")
> c = con.cursor()
>
> s1 =333333333
> toDo ="Update ex set amount = ? where ex_id = 1"
> c.execute(toDo,s1)
> con.commit()
> c.close()
>
>
> Can anyone help?
>
> Dan
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>


--
---
The Castles of Dereth Calendar: a tour of the art and architecture of
Asheron's Call
http://www.lulu.com/content/77264

Reply via email to