Page 1 of 1

[Solved] Subform entries disappear when form is closed.

Posted: Wed Jan 15, 2020 5:49 pm
by the ber
I have been using a split HSQLDB database for a couple of years in BASE. Now I am switching to MariaDB with BASE as a front end so that I can use MySQL Workbench for queries, etc. To do this I created a new .odb file, modified the HSQLDB entries that had Primary Key = 0, imported all the data into MariaDB, and so on.

I then copied an original form (with two sub-forms) from the HSQLDB .odb to the MariaDB .odb, and modified it using BASE, to reflect some small changes that I had made in the tables. This form works as expected when entering data, so far so good. When I reopen the form to enter more data, the original data that I entered into the sub-forms is missing. The data is not gone from the database though, I can still query it.

This did not happen when I was using the HSQLDB file in BASE. AS far as I can tell by comparing the properties, the two forms are created equal. I have restarted, tried the development version (6.4) of LibreOffice, different Linux distro, etc. but nothing helps. Can someone point me in the right direction?

Re: Subform entries disappear when form is closed.

Posted: Wed Jan 15, 2020 10:55 pm
by Villeroy
The subform is set to "new records only".

Re: Subform entries disappear when form is closed.

Posted: Thu Jan 16, 2020 4:59 pm
by the ber
Thanks for your reply. In the "Form Properties" windows the option "Add data only" is set to "No" in all of the forms. I hope that this is what you mean.

Just now I tried to set these options to "Yes" and then back to "No" to see if they would 'reset' somehow, but I cannot even change the options in any of these forms to "Yes". When I change the "Add data only" option to "Yes", then open and re-close the window, the option is back to "No".

Of course nothing has changed; the data is still not shown.

Re: Subform entries disappear when form is closed.

Posted: Fri Jan 17, 2020 9:51 pm
by UnklDonald418
It appears your problem is likely related to how Base is addressing the MariaDB backend.
Rather than copying the form document from the HSQLDB, have you tried creating a new Form/SubForm? Controls display the data that the Form hands it so you should be able to copy the controls, but I would try creating new Forms from the MariaDB connection.
Now I am switching to MariaDB with BASE as a front end so that I can use MySQL Workbench for queries, etc.
If that is the only reason for the switch, have you tried SQL Workbench/J? It connects to a split HSQLDB using the same URL as Base.

Re: Subform entries disappear when form is closed.

Posted: Sun Jan 19, 2020 12:40 pm
by the ber
I was hoping to avoid recreating the form, but you were correct. The new form works as desired. Thanks for the tip.

Your suggestion about SQL Workbench/J is interesting. I will try it out some time.