Base - autosave and ctrl-s not working

Using LO downloaded from the LO website on Linux Mint 19.3, using an external Firebird database.
Data entered in Base forms is not saved by autosave, so all new data are lost when LO crashes (data are not retrieved by restore).
Also, the keyboard shortcut ctrl-S and the menu-item “Save” in the File-menu don’t save data on the form. When I enter data in a form and press ctrl-S, or select SAVE from the File-menu and then close the form, base pops up a dialog asking me if I want to save the new data. If I close the form without clicking the save-button on the dialog, the data are indeed gone.
I can only save data by:

  1. adding a save-button to the form and clicking that button
  2. closing the form and clicking the save-button on the dialog that base pops up to ask me if I want to save the data.

How can I make ctrl-S work? How can I make autosave save newly entered data?


You do not mention the database you use. Please mention in each question. It appears from a past question this may be Firebird embedded (still experimental). If yes, then there is no automatic save. See tdf#117118

This is normally saved when on the main Base screen and before closing Ctl-S will save the data for all done in the session. Are you using stand alone forms?

If using standalone forms, the probable answer is the FLUSH command. See tdf#112458 & tdf#128607

Hi Ratslinger, thanks for replying. I edited the question to show that I’m using an external Firebird database.
I’m not using standalone forms.
Since autosave doesn’t work, it would be helpful if I could make my own save-button change colour when ever the form is dirty, to remind myself to save the form manually. But I don’t find an onDirty-event like in msaccess. Is there an onDirty-event?

Not certain this is what is needed. Saving at the form level is not going to save the data for the DB in a crash. Again see the first bug report noted above. The database is saved at the main Base screen.

Have not tested but possibly that Flush mentioned in the second two bug reports might be a direction to look at.

Not aware of one

Saving at the form level is not going to save the data for the DB in a crash

Not sure if I understand correctly, but on my form I have a save-button that executes:
dispatcher.executeDispatch(document, ".uno:RecSave", "", 0, Array())

This does seem to save the record: when I save changes on the form with this save button and subsequently kill the soffice process (which I think simulates a crash), the newly saved data can be recovered.

I now attached this code to the “when losing focus” event of all editboxes on the form, so that everytime I leave an editbox, the form is automatically saved. Not the same as a proper autosave, but hopefuly I will lose less data with this hack.