Ask Your Question
0

Database does not saves changes to disk after form submitting

asked 2016-05-18 09:46:31 +0100

Eic gravatar image

Libreoffice Base doesn't save new records or changes to records after commit applied by pressing "Save" button in form.

I have a "todo" Base document with data table and some forms to add, view and modify this data table. When I add a new record and commit it from the "add" form, I could see data changes in "view" form as expected. But if there is a crash of Libreoffice, no recent data changes could be retrieved from saved to disk database file.

For example: add new record to table, commit it and check if it's there. Then "kill -9" Libreoffice or simulate crash by the other means. Open saved database file, answer "yes, recover" to "Recover after crash" dialog and check there is no recently added data record. Data lost could be significant in such a way (for some days for long uptime).

There is an old closed question related with a macro workaround: make-database-store-changes-immediately

So, is there a way to commit changes to disk(!) manually? Without using a macro? Should it be the default behavior?

Base info:

Version: 5.0.3.2

Build ID: 1:5.0.3~rc2-0ubuntu1~trusty2

Locale: en-IE (en_US.UTF-8)

Database driver: HSQLDB

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2016-05-18 20:13:03 +0100

Eic gravatar image

Yes, there are some pieces of information after some search:

  1. HSQLDB v.2+ supports disk-based tables (hsqldb.org) but Libreoffice Base uses v.1.8.

  2. There is some work to update Base driver (hsqldb.org).

  3. There are workarounds to bugs related to embedded "in-memory" HSQLDB v.1.8 (forum.openoffice.org).

  4. It seems, there is no easy solution for this problem. Only "close - open", using macro and some manual SQL commands maybe. I think, developers should warn users.

Summary: do not use embedded HSQL! Never!

edit flag offensive delete link more

Comments

Embedded HSQL is good for samples on forums. Never say never!

Ratslinger gravatar imageRatslinger ( 2016-05-18 20:50:36 +0100 )edit
0

answered 2016-05-18 14:10:15 +0100

Michel_1495 gravatar image

are you using the embedded database 1.8? As .I don't think the record is saved to disk before a normal close down is executed. HSQL is present all the time in memory.
I think you should split the database or use a back-end like mysql.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-18 09:46:31 +0100

Seen: 617 times

Last updated: May 18 '16