@Greg:
There is no COMMIT in the example (nor BEGIN TRANSACTION). I added the later (and forget the former). Are-they mandatory ?
Removing COMMIT TRANSACTION makes the code working. *
@Markus:
ID is an Integer and the code works fine (even if the two single quotes are useless). Fortunately, Xojo remind me when I forget to convert the ID value to String.
2019r2: thank you, but no thank you. I am too old for this gamble and my license to build application(s) does not go to that version.
Day after day, it tooks me more time to write code (I have to look more often to the documentation / my previous projects (when I recall I do that in an old project).
For that project use, I added a batch add Records from a text file for the core of the Record inforation (I have these information handly for a ton of subjects); the UPDATE RECORD is meant (in part) to let the user complete the Records with images and specific data (into a Listbox / a TextField and a Comments TextArea). I may eventually add the images import and save automatically (I have to explorate it.
After all, a computer is here to run by itself all repetitive tasks, when possible and I found that boring to do it manually.
Emile, simply put for every BEGIN TRANSACTION there should be either a COMMIT or Rollback statement. After the BEGIN TRANSACTION statement, the database system “accumulates” the commands but doesn’t actually write them to the database. (This is why on multi-user databases, one user may make a change while another user retrieves old data.) Once all of the database commands are done, the program should issue a COMMIT statement to write the changes to the database. If, however, an error occurred, a ROLLBACK statement can roll back the changes, essentially throwing out the unCOMMITted edits.
If a database command is issued before a BEGIN TRANSACTION statement, the database sees it as a standalone transaction and COMMITs it automatically with no chance of rolling it back.
In practice, the recommendations are that SELECT statements can be done without starting a transaction but any commands that alter the database in any way should be bracketed in BEGIN TRANSACTION and COMMIT statements.