Help with Split HSQLDB - existing LibreOffice Base project

Discuss the database features
Post Reply
LeslieM
Posts: 1
Joined: Sun Aug 20, 2023 2:02 am

Help with Split HSQLDB - existing LibreOffice Base project

Post by LeslieM »

Can anyone point me in the right direction? My goal is to update my existing Based application to use the current version of HSQLDB. I want my tables, queries, forms, etc. to all come across into the new DB version. I tried following the instructions viewtopic.php?f=83&t=65980 and using step 3X, but when I created the new macro it seemed to be read-only - could not paste in the macro code.

Alternatively - if there is an easy way to change Base to reference the database via JDBC, and a way I can migrate the database folder inside the ODB to the server I could try that approach. I searched on the forum and did not see a guide for taking an existing embedded HSQLDB and moving it to be client/server based.

Thanks in advance for any advice you might be able to provide!
LibreOffice 7.5.3.2 Windows 11
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Nick N, »

Hi Leslie,
I beg your pardon!
Thus i am a newbie in IT science, i would like to try to give you an hint, i.e. does your Operating System contain full pre-loaded software?

At BASE launch time, I usually got two options: by the way HSQLDB or FIREBIRD. But no more with the current one.

Try to verify for yourself.

See attached screenshot.

Hope it would help.

Regards

Nick
Attachments
HSQLDB option.png
HSQLDB option.png (37.63 KiB) Viewed 3610 times
Libre Office 6.0.7 on Ubuntu 18.04
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by robleyd »

At BASE launch time, I usually got two options: by the way HSQLDB or FIREFOX
I think you mean HSqldb or Firebird

Creating new Firebird databases has been moved to an experimental feature since LO 6.4.3 You can turn on experimental features via Tools>Options>LibreOffice>Advanced from the menu.

Place a check mark next to “Enable experimental features”.

However, I don't think your response is relevant to the question posed by LeslieM
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Nick N, »

@ Robleyd

Thanks for rectifying my draft. Are you certain it wouldn't help somehow?

Have a nice week...

Nick
Libre Office 6.0.7 on Ubuntu 18.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Villeroy »

Start with an embedded HSQLDB. When you've set up all your tables, relations and indices follow this approach to extract the embedded database: [Python] Macro to extract and reconnect embedded HSQLDB

If you add a subfolder "driver" with a database driver "hsqldb.jar", this driver will be used. Otherwise, your database will be driven by the same hsqldb.jar as the embedded databases. This does not work with hsqldb later than 2.4.3 Version 2.5. is not compatible with the very old driver of version 1.8 that is shipped with your office suite. After upgrading to 2.4.3 you may upgrade to the most recent version. I stick to 2.4.3 which works very well with LibreOffice and does not lack any features that are important for me.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by UnklDonald418 »

Be aware some compatibility issues (usually minor) have been reported when using Base with HSQL versions 2.5.0 and above. I currently have two Base databases using HSQL 2.7.0 and haven't run into any problems ... so far.

If you think you want to try a more recent version of HSQL than 2.4.3
Be sure you have a current backup of all the files in your split database directory.
With the old version open, at Tools>SQL execute the command

Code: Select all

SHUTDOWN SCRIPT
Close the database.
Replace the hsqldb.jar file in the driver sub-directory with the new version.
Open the database and the data should automatically load from the script file into a new mydb.data file compatible with the new HSQL version.
Use the same procedure if you decide to go back to an earlier version of HSQL
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Nick N, »

@ Leslie M

you wrote:
Alternatively - if there is an easy way to change Base to reference the database via JDBC, and a way I can migrate the database folder inside the ODB to the server I could try that approach. I searched on the forum and did not see a guide for taking an existing embedded HSQLDB and moving it to be client/server based.
I connected to MySql via JDBC /localhost.

By now i can use LO as a HSQLDB interface with the benefit of wider SQL commands range. E.G. GROUP_CONCAT.

Regards

Nick N
Attachments
sql group contact statement.png
sql group contact statement.png (7.51 KiB) Viewed 3120 times
Libre Office 6.0.7 on Ubuntu 18.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Villeroy »

Things like GROUP_CONCAT, DATEADD, regex and array functions are also part of HSQL2.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Nick N, »

I'll try. Thank you.
Libre Office 6.0.7 on Ubuntu 18.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Villeroy »

Simply copy your document with embedded HSQL in a dedicated directory, add a subdirectory "driver" with a copy of hsqldb.jar of version 2.4.3 (last version able to upgrade from version 1.8). Finally, open the document and run my Python macro. The macro can be installed with a single click on a button. The HSQL documentation is shipped with the downloaded archive from where you extracted the hsqldb.jar.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Nick N,
Posts: 140
Joined: Wed Aug 09, 2023 2:10 pm

Re: Help with Split HSQLDB - existing LibreOffice Base project

Post by Nick N, »

Please forgive me if I've tried different solution on the web. I shouldn't say different but "alike" or "ready made" instead.

My aim was only to show to a french fellow that With A Little Help, I would have succeeded.

Consider my attachement.

Have a nice time!
Attachments
Split_hsqldb_232_wizard-v3d.png
Split_hsqldb_232_wizard-v3d.png (5.65 KiB) Viewed 2869 times
Libre Office 6.0.7 on Ubuntu 18.04
Post Reply