[Solved] Subform entries disappear when form is closed.

Creating and using forms

[Solved] Subform entries disappear when form is closed.

Postby the ber » Wed Jan 15, 2020 5:49 pm

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 6.3 with split databases, on Windows 7 and various Linux Distros; MariaDB 10.3 on Linux
User avatar
the ber
 
Posts: 19
Joined: Sun Jul 12, 2009 4:26 pm
Location: Germany

Re: Subform entries disappear when form is closed.

Postby Villeroy » Wed Jan 15, 2020 10:55 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28431
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Subform entries disappear when form is closed.

Postby the ber » Thu Jan 16, 2020 4:59 pm

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 6.3 with split databases, on Windows 7 and various Linux Distros; MariaDB 10.3 on Linux
User avatar
the ber
 
Posts: 19
Joined: Sun Jul 12, 2009 4:26 pm
Location: Germany

Re: Subform entries disappear when form is closed.

Postby UnklDonald418 » Fri Jan 17, 2020 9:51 pm

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1322
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Subform entries disappear when form is closed.

Postby the ber » Sun Jan 19, 2020 12:40 pm

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 6.3 with split databases, on Windows 7 and various Linux Distros; MariaDB 10.3 on Linux
User avatar
the ber
 
Posts: 19
Joined: Sun Jul 12, 2009 4:26 pm
Location: Germany


Return to Forms

Who is online

Users browsing this forum: No registered users and 2 guests