[Solved] Setting up split database

Discuss the database features
Post Reply
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

[Solved] Setting up split database

Post by Nocton »

I have not set up a new split databse for some years. Needing to show a friend how to do it I followed instructions in [Tutorial] Splitting an "embedded HSQL database" Option 2

All appeared OK, but after dragging and dropping queries and forms and closing and reopening mydb_wizard.odb, no tables appeared and when click on query get error message: "The data content could not be loaded"

Does anyone know what the problem is? If I drag in the tables from the embedded database too, then all works OK, but then editing tables is not so straightforward.

Also I checked the Database Properties and when click on 'Test class' got the error: "The JDBC driver could not be loaded"
Last edited by RoryOF on Fri Jun 14, 2019 11:08 pm, edited 2 times in total.
Reason: Added green tick [RoryOF, Moderator]
OpenOffice 4.1.12 on Windows 10
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Setting up split database

Post by F3K Total »

Hello Nocton,
maybe this.
If you use hsqldb 1.8.10. you need to add java folder and archive to classpath:
CP.PNG
or use Villeroy's extension FreeHSQLDB at least, if you use a higher version than 1.8.10.
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Setting up split database

Post by Nocton »

TY, F3K Total, I have added the archive to the class path. Now when I 'Test Class' I get the message: "The JDBC driver was loaded successfully".

But the tables still do not show and when I open a query or form I get the message: "The data content could not be loaded. Table not found ..."

A question which might help resolve the problem. How does mydb_wizard.odb know here to look for the database with the tables in it? I dragged and dropped the queries and forms from it to mydb_wizard.odb, but where is the path to it?
OpenOffice 4.1.12 on Windows 10
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Setting up split database

Post by Nocton »

Further to my reply to F3K Total, I found that after adding the class path another split database no longer worked (one with the tables within the split data base not linked to another). Checking the instructions for the Setup macro it says:
'Instructions for use:
' (1) manually remove any global Class Path to hsqldb.jar if setup in Tools > Options > *Office > Java/Advanced > Class Path

So this is not the solution, but adding another problem.
OpenOffice 4.1.12 on Windows 10
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Setting up split database

Post by Nocton »

Problem solved! I did not read/complete the instructions fully and missed out step E:
E. Migrate your existing Tables (database records) through file extraction:

a. Open the Base .odb file with a zip file-extraction tool and locate the 'database' subfolder containing the files: script, properties, data, and backup.

NOTE: It may be necessary to un-hide file extensions, and perhaps rename this .odb file with a .zip extension, as necessary. Don't forget to replace the original .odb file extension following the extraction step below.b. Extract (un-zip) the database files (script, properties, data, and backup) to the split-database folder (created in Step C).
c. Rename these newly-extracted files with a common prefix such as: mydb.script, mydb.data, mydb.properties, and if present mydb.backup.
OpenOffice 4.1.12 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Setting up split database

Post by Villeroy »

[Python] Macro to extract and reconnect embedded HSQLDB. If you provide an alternative hsqldb.jar, the macro will assign this driver to the database, otherwise you get an extrnal HSQL 1.8 working with the office driver. The same macro will reconnect if the db-path has changed (move to other system).
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
Post Reply