In this tutorial I’m going to create a LibreOffice split database and import some csv text files that have been exported from a different database system.
First Create The Split Database
There are many ways to import data into LibreOffice base, I’ll start off here with the most simple – if not the most robust way, which is importing data via the user interface.
Fig 1
You can download the split database setup file here, it’s actually just an OpenOffice or LibreOffice database file with some macro code that sets everything up for you.
Put the database file in the directory or folder that you want, double click on it and follow the onscreen prompts and you’ll soon be good to go.
The attached YouTube tutorial will take you through the setup in detail.
Move the split database file into the folder that you want your application to reside in.
Fig 2
Then double click on the split database file "Split_HSQLDB_2.3.2_Wizard_v3d.odb" (or whatever the version number is at time of reading this) to launch the wizard.
Get notified when new Business Programmer blog or video tutorials are created.
Fig 3
Click enable macros in order to proceed (i.e. the button above that’s NOT blue).
Fig 4
Change the database name to one that’s meaningful for your project then click OK.
Fig 5
Then click the OK button on the information dialog box that appears.
And you’re done, the database has been created.
Your split LibreOffice base or OpenOffice database is now created and good to go.
You can now use this just like any LibreOffice database, except this is more robust, and less likely to get corrupted, than normal embedded default database files created without the extra precaution of creating a split database.
What The Folder Structure Looks Like Now
Earlier when you double clicked on the database, the folder looked like Fig 1 at the start of this page, it now looks like Fig 6 below.
Fig 6
I’m showing three views of the same folder here, first with the database folder highlighted, then the driver folder visible so you can see the contents of both.
What’s going on here is that the base database is a front end to the HSQLDB database system and now it’s more visible rather than being hidden in a compacted file.
Now might be a good time to make a copy of the containing folder that contains all of these files and place it in safe location.
You can use this as a template for other split database files without having to go through this setup process again.
You can use this saved copy to create new databases and just rename the ".odb" file to the database name of your choice.
Get notified when new Business Programmer blog or video tutorials are created.
Don’t forget to comment below and let me know if this was helpful.
Also feel free to tell me what topics you would like covered in the future.
Tony says
This is just what I needed. I used to work with Access and remember being able to develop the front end of a database and replace an existing one without disturbing the data which is what I wanted to do.
I didn’t really understand from your tutorial how to do that but a bit of experimentation seems to have paid off. I am now launching the odb file I want to amend, changing forms etc. but not the data and then replacing the old odb file in another location. This seems to give me all the changes to forms without disturbing the background data. I hope what I am doing is correct, It does seem to work OK so I would appreciate confirmation that I am doing the right thing.
Thanks for the tutorial.
Tony
Sean Johnson says
HI Tony
Just noticed your comment now, Yes you’ve just reminded me that I need to create a tutorial on how to convert an existing “Non Split” LibreOffice database to a split database (as opposed to creating a split database from scratch).
Think that will be my next video, sometime early January 2020, If you’re on my mailing list I’ll send out a notification when it’s up there.
Torben says
Hi.
When opening your present version of the odb-file (Split_HSQLDB_Wizard_v3c.odb downloaded Feb 18 2021) I get an error.
Driverclass ‘org.hsqldb.jdbcDriver’ could not be opened. The driver class path is ‘file:///C:/Users/Public/databases/AutoValueFix/driver/hsqldb.jar’.
This path does not exist on my system (Windows 10 Pro, 20H2).
I can easily create databases using the hsqldb-type, so the basic LibreOffice installation seems to be correct.
What can I do?
Torben says
… And in fact the same happens when I try opening the odb-file in Linux Mint (20).
Torben says
Found out.
You need to set trust of macros to medium 🙁