[Solved] Subform entries disappear when form is closed.

Creating and using forms
Post Reply
User avatar
the ber
Posts: 26
Joined: Sun Jul 12, 2009 4:26 pm
Location: Germany

[Solved] Subform entries disappear when form is closed.

Post 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?
Last edited by the ber on Sun Jan 19, 2020 12:41 pm, edited 1 time in total.
LO 7+ on Windows 7, 10 and various Linux Distros; MariaDB on Linux
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Subform entries disappear when form is closed.

Post by Villeroy »

The subform is set to "new records only".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
the ber
Posts: 26
Joined: Sun Jul 12, 2009 4:26 pm
Location: Germany

Re: Subform entries disappear when form is closed.

Post 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.
LO 7+ on Windows 7, 10 and various Linux Distros; MariaDB on Linux
UnklDonald418
Volunteer
Posts: 1547
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Subform entries disappear when form is closed.

Post 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.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
User avatar
the ber
Posts: 26
Joined: Sun Jul 12, 2009 4:26 pm
Location: Germany

Re: Subform entries disappear when form is closed.

Post 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.
LO 7+ on Windows 7, 10 and various Linux Distros; MariaDB on Linux
Post Reply