"aivars" <[EMAIL PROTECTED]> wrote

sPath=r'e:\pythonexamples\aivars2.db'

con=sqlite3.connect(sPath)
cur=con.cursor()
cur.execute("insert into test (name) values (?)",sPath)
con.commit()

 File "E:\PythonExamples\test.py", line 7, in <module>
   cur.execute("insert into test (name) values (?)",sPath)
ProgrammingError: Incorrect number of bindings supplied. The current
statement uses 1, and there are 28 supplied.

It looks like name expects a char and you are giving it a string.
How did you define the name field of test?
Can you send us the create statement?

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

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to