I have a weblistbox that is updated from an SQLite table on action.open. The first column contains the RowID of the database table. This is defined auto increment primary key.
I can insert and delete table entries and add or remove from the database table but i can’t get my head around updating the database table.
I can read the data from the weblistbox, which came from the table, edit the contents, write the data back to the weblistbox, but I cannot update the specific row in the database table.
I am using prepared statements for the other functions.
Any help would be greatly appreciated as I learn how to do this.
That’s what I thought but it doesn’t change the value in the table i.e. I change contents of the “descriptor” column and I do the update. I don’t get a dberror and the data isn’t changed when I reload the weblistbox from the table. I’ll recheck my rowid method to make sure this isn’t my problem. I am using here the in-line sql statement.
With the prepared statement am I correct with this method:
update set <column = ?, set column1 = ? where rowed = ?
db.bind(0,descriptor.text)
db.bind(1,name.text)
db.bind(2,rowidvalue)
Yes it should be rowid (darned autocorrect… if I write rowed it autocorrects it to rowid but if I write rowid it autocorrects it to rowed… I can’t win).