sqlite query not working

John Salerno johnjsal at NOSPAMgmail.com
Tue Nov 7 15:57:07 EST 2006


Hopefully this is enough code to reveal the problem. When I run the 
program, there are no error messages produced, it's just that the values 
I enter don't seem to get put into the database, even though the query 
seems to be ok.


     def OnSaveRecord(self, event):
         textfield_values = []
         for tab in self.notebook.GetCurrentPage().GetChildren():
             for table in self.get_textfield_ids():
                 table_values = []
                 for textfield_id in table:
                     table_values.append(xrc.XRCCTRL(tab, 
textfield_id).GetValue())
                 textfield_values.append(table_values)
         res_id = self.create_id(textfield_values[0][0], 
textfield_values[0][2])
         for table in textfield_values:
             table.insert(0, res_id)
         self.save_to_database(textfield_values)

     def save_to_database(self, data):
         # doesn't work?
         self.connection.execute("""INSERT INTO Personal VALUES
                                 (?,?,?,?,?,?,?,?,?,?)""", tuple(data[0]))



More information about the Python-list mailing list