Close all documents
menu:Tools>Options>Java (LibreOffice: "Advanced" instead of "Java")
[Class Path ...]
Add archive hsqldb.jar wherever it resides.
Restart office.
DO NOT OPEN ANY EMBEDDED HSQLDB FOR NOW. It will be converted to HSQL2 and then it won't be usable unless you extract it
File>New>Database...
[X] Connect to existing database
Type: JDBC
URL: jdbc:hsqldb:file:
/path/database/foo;default_schema=true;shutdown=true;hsqldb.default_table_type=cached;get_column_name=false
Driver class: org.hsqldb.jdbcDriver
[OK]
Click the table section to establish the connection with a new set of database files whose names start with foo. No tables created so far.
Notice that the red path should be written in system notation which is unusual for an URL, e.g. on Windows: jdbc:hsqldb:file:
C:\path\database\foo. The blue part of the URL is a set of useful options for Base connected to HSQL.
Run the following macro after adjusting the driver path in the macro code (URL notation). The macro stores the path do the database driver within the Base document. This option is not availlable in the Base GUI.
Code: Select all
Sub setDriverPath()
ThisDatabaseDocument.DataSource.Settings.JavaDriverClassPath = "file:///path/to/hsqldb.jar"
End Sub
Save the database document.
Remove the global class path you have added in the first step and restart the office. The new database knows its own path to its hsqldb.jar and you should remove the global class path in order to be able to use embedded HSQL without spoiling them.