-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alan Hyde wrote: > def updateDb(record): > c.execute('INSERT INTO ardrecords (testdata) VALUES ("?")', (record))
Short answer: You should not be quoting the ? and are missing a comma after record. Long answer: Quoting the question mark inserts a question mark and is not a binding. Also SQL uses single quotes as standard for strings with double quotes resulting in implementation specific behaviour. (record) is the same as record - to make it a sequence of the string you need to use (record,). The final result should be: def updateDb(record): c.execute('INSERT INTO ardrecords (testdata) VALUES (?)', (record,)) Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIF+mTmOOfHg372QQRAvyAAJoCflNdTK8SqaitpgDEVxxQrlKVFQCfdcyu QTpI30wDGQKgyjHBhiTkiuA= =ETTQ -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users