RecordSet.Edit
From Xojo Documentation
This item was deprecated in version 2019r2. Please use RowSet.EditRow as a replacement. |
Call Edit prior to performing modifications to the current record. Be sure the SQL incudes the primary key column (or columns) so that you can update the table after making changes. Changes are only saved to the DB when Update is called.
Notes
Check the Database.Error property after calling this method. If the record is already locked you will see an error there and you can display the error message.
A RecordSet is populated in memory when you call the SQLSelect method. If you use MovePrevious to go back to prior records (including those that you have changed using the Edit method), then you will get the values that were originally populated, not the changed values.
Editing with MySQL
MySQL cannot guarantee the contents of a RecordSet after issuing an Update call (after having previously called Edit). This means you should not try to modify the contents of a RecordSet in a loop. Instead select just the single record you wish to modify.
Sample Code
Set the string value of a column in a RecordSet: