[Tutor] problem with simple sqlite script
aivars868 at gmail.com
Fri Nov 7 12:56:30 CET 2008
That did the trick! It's worth to remeber.
Thank you very much!
2008/11/7 Kent Johnson <kent37 at tds.net>:
> On Fri, Nov 7, 2008 at 3:49 AM, aivars <aivars868 at gmail.com> wrote:
>> import sqlite3
>> cur.execute("insert into test (name) values (?)",sPath)
> The second argument to execute() is a *sequence* of parameter values.
> A string is a sequence of characters, so by passing a plain string you
> are saying that each character of the string is a parameter to the
> Try adding braces around the parameter to make list:
> cur.execute("insert into test (name) values (?)", [sPath])
More information about the Tutor