Oct-27-2016, 03:16 PM
(Oct-26-2016, 10:38 PM)Larz60+ Wrote: Hi again,
I asked if this was a one shot deal. The reason is that if so, you could make the changes manually with sqliteman.
That being said, are you getting any errors from your code, if so please post.
I'm not sure about sqlite3, but other databases Oracle for one (at least this used to be so) didn't allow changing the id
of a row in place, if that row was indexed by the field you were trying to changed.
You had to do one of two things:
delete the row and re-insert
or
remove the index, make the change, and reload the index.
obviously on a large database the first option is the one you would use.
I'd try it this way:
1. read the row and save the results.
2. delete the row.
3. insert the saved row (with the changes).
The "id" isn't a primary key since it is absent in the new rows...
Of course, here we just answer the questions asked, but it is likely that these stem from not-so-good design.
A very interesting read
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net