These two files contain minor edits to Villeroy's Python DB splitter and Basic modules for ensuring a connection to the DB backend. The edits make the Python and Basic code aware of the WSL (Windows Subsystem for Linux) file hierarchy used by whatever Linux distribution is installed under WSL so that both sets of code can run under Windows inside the Linux file hierarchy.
Why would anyone do that? Windows can see inside the Linux hierarchy, but Linux can't see outside its own hierarchy. For development, to ensure that my current project works under both OSs, I've got my development odb file in the Linux hierarchy. I access it from LO running under Windows for development, and then run it with Ubuntu/LO for testing. (Ubuntu/LO runs a bit slow under WSL, so I don't use it for development.) My computer may be the only computer in the universe set up this way, but if there's someone else doing the same thing and they decide to split their DB (as they should), these edited files will save them a lot of trouble.
One thing to remember is that Linux/LO can only work with HSQLDB 1.8.0.10. If you split your DB and upgrade the Windows version to 2.x, it will be incompatible with Linux/LO. To maintain access with both Win/LO and Linux/LO, you can only use 1.8.0.10. For that reason, I've set the driver path constant in the Basic code to the zero-string, forcing the code to use LO's internal hsqldb.jar driver file. That means that you don't need the driver subdirectory and it will be ignored if it's present. Aside from that, follow the instructions in Villeroy's original posts, linked here: [Python] Macro to extract and reconnect embedded HSQLDB and FreeHSQLDB v.0.4
DB splitter & external DB connecter with WSL
Forum rules
For sharing working examples of macros / scripts. These can be in any script language supported by OpenOffice.org [Basic, Python, Netbean] or as source code files in Java or C# even - but requires the actual source code listing. This section is not for asking questions about writing your own macros.
For sharing working examples of macros / scripts. These can be in any script language supported by OpenOffice.org [Basic, Python, Netbean] or as source code files in Java or C# even - but requires the actual source code listing. This section is not for asking questions about writing your own macros.
DB splitter & external DB connecter with WSL
NASA Mars Rover Hacking Project: Martians supplying Earth with bogus scientific data since 1997.