LibreOffice Base database crashes with loss of data

I am building a small database for an organization that my wife is a member of. It has name, address, phones, email data as well as a jpg photo of each member. I’m using .jpg photo files all less than 300k. As I’m entering data suddenly the database crashed and lost most of its photo data but not all. I have a backup and was able to but the database back but the size of the file is getting quite larger even without additional data being put in.

I’m wondering if there is a way to clean up the database. If it has too many “holes” perhaps this could lead to instability…??

Thank you very much for any thoughts! My wife and her friends are depending on me!!

–Bob Harris

Rather than store your pictures in your database, consider storing only links (file-paths) to your pictures. In this case, your pictures are stored in a folder with your Base database file/s but not in the database file itself. The picture control on your form can handle this method. See HERE for more information.

Assuming you are using the default “embedded” method connecting to your database using default HSQLDB ‘engine’, you may ‘compact’ your database by running ‘CHECKPOINT DEFRAG’ (without the quotes) in the SQL window. (NOTE: This method does not work with other database engines.)

Your database ‘instability’ may not necessarily be caused by storing pictures in the database. ‘Embedded’ mode databases are notoriously prone to data loss/corruption. Use ‘split’ mode to avoid these problems. See HERE.

Thank you very much for the suggestions! I am reading and trying and am very hopeful that everything will eventually work out. I very much appreciate your very helpful response.
Bob