DataControl behaviour

Hi All. I am developing an app which uses MySQL Community Server. I have installed MySQL plugin. I have added the db to my project, and I have built a form which includes a DataControl linked to my db and a number of text controls which are bound to the DataControl.

The problem:
I can browse the table data using the next / prev buttons. If I navigate to some random record, then make a change in one of the fields (say, Address for example), and I then navigate to another record without issuing an explicit Update command, the updated “Address” data does not get saved to the record that was displayed, but instead, it gets saved to the First record in the recordset.

Is this a normal behavior? If so, then it will be necessary to use code to disable the nav buttons until a “save” command has been executed?

I Also notice this behavior is identical regardless of the setting of the DataControl’s Commit property. Very odd?
Am I doing something wrong?
Thanks for any advice.

This may not be a helpful reply but I would suggest not using the data control. This was the advice I was given when starting out with databases. It is much better to populate your own recordset and then display the records in your text fields etc. You have much more control over it. It may seem like the harder way to do it initially but I would just not use the data control any more.

Thanks Mike, I was sort of coming to that conclusion too - but just wanted to make sure it wasn’t me being stupid! However there is one problem with working directly with the database recordset, in that MySQL plugin for Xojo only appears to support .FindNext nav method, where the DataControl supports the usual First / Last / Prev methods… Ho Hum…
:frowning:
Many thanks for taking the time to respond.