Page 1 of 1

[Solved] Fatal error saving Base data

Posted: Mon Sep 20, 2021 8:01 pm
by AfTech54
OOO 4.1.10 and Windows 10 19042.1237

I'm using Base to create records for my photos. Base is working fine but I've problem when saving data. Sometimes after saving I get the message fatal error. Looking at the file information I can see that it should be 29 mb, but it can be zero, about half or even bigger than 29 mb.
If it is errornous I have to get an earlier version of the file and do the recording once again. I'll get the same problem on both my PC and LapTop. It doesn't matter if I'm saving on MS OneDrive or the local HDs. If I succeded to save I have to copy and past to the other lacations to be sure that the file won't crash.

Now this problem happens so often that I consider to do this recording of photos in another way.

I've turned off save backup and recovery info (each 15 min) in OOO. But this doesn't help.

Anyone that have any idea what's wrong here?

Re: Fatal error saving Base data

Posted: Mon Sep 20, 2021 8:06 pm
by Villeroy
Do yourself a favour and do NOT save pictures in an embedded HSQL database. Sooner or later you will lose all your data.
1) Store the pics in a dedicated directory or in the same directory as your database.
2) Instead of binary data, store the file names in a text field.
A picture control linked to a text field loads the picture from file.
3) Convert any embedded HSQLDB into a stand-alone HSQLDB in order to minimize risk of data loss.

Re: Fatal error saving Base data

Posted: Mon Sep 20, 2021 11:57 pm
by AfTech54
I'm storing nothing else but text, date and booleans in 7 tables.
I have no other connection to the photos than the filename in the tables.

Re: Fatal error saving Base data

Posted: Tue Sep 21, 2021 1:57 am
by Villeroy
The local disk is the only place to store this type of database while you may use a cloud drive for a backup of course.
Get some working copy and save it to local disk.
menu:Tools>SQL...

Code: Select all

SHUTDOWN COMPACT
And shut down the office.
Now the database document should be a lot smaller.

Re: Fatal error saving Base data

Posted: Tue Sep 21, 2021 9:57 am
by AfTech54
Thanks Villeroy! It schrinked from 29 to 2 Mb.

I ran the SHUTDOWN COMPACT
Saved db
Should I close the OOO app as well?

What does the command do, clening up unnessary data?

Should I use this command each time I save the data?

Are you suggesting that I should allway save on the local HD (C:) on each computer and then copy past the file to the cloud and the other HDs?

Re: Fatal error saving Base data

Posted: Tue Sep 21, 2021 1:28 pm
by Villeroy
Shared databases all over the internet, including this forum, use database servers. Database servers enable simultanious multi-user access without accidents. Having a free server where you can install your own services, it is not too difficult to transfer your embedded database into a true server database.
Every time you access your database document, the embedded HSQLDB needs to be installed to a temporary directory on your disk. Then it needs to be wrapped back into the document when you close the current form, query or table. This container format (just an ordinary zip archive) was designed in 2004 with no cloud computing in mind.
Of course, you can share your document with embedded HSQL on a cloud server, as long as all users work with a local copy but not simultaniously because there is no way to keep the database records in sync when users edit independent copies of the database at the same time. The cloud server needs to keep one mandatory copy which is used by one user after the other.

Disclaimer: I know next to nothing about cloud computing.

Re: [Solved]Fatal error saving Base data

Posted: Tue Sep 21, 2021 7:29 pm
by AfTech54
Thanks Villeroy!!