Am I using the ? placeholder wrong in this example?

t = ('hi', 'bye')

self.connection.execute("INSERT INTO Personal (firstName, lastName) 
VALUES ?", t)



Traceback (most recent call last):
   File "C:\Python25\myscripts\labdb\dbapp.py", line 93, in OnSaveRecord
     self.save_to_database(textfield_values)
   File "C:\Python25\myscripts\labdb\dbapp.py", line 97, in save_to_database
     self.connection.execute("INSERT INTO Personal (firstName, lastName) 
VALUES ?", t)
sqlite3.OperationalError: near "?": syntax error
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to