[Solved] Auto re-register db on name or location change

Creating and using forms
Post Reply
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

[Solved] Auto re-register db on name or location change

Post by gkick »

Hi there,

The automacro in the splitdb template intelligently reconfigures the url for connecting the backend if the location and or the name of the fe changes.

Would it be at all possible to sort of auto register the database if changes occur?

Because if you have linked calc or writer files sitting in the split folder and the name or path if the folder or the name of the db changes, the db no longer is registered as considered a different db. If that happens CALC gets very angry, first telling it cant find the source and then goes into sulk mode and crashes, the file never to be reopened again leaving the lock file behind.

kind regards

GK
Last edited by gkick on Mon Nov 25, 2019 7:47 am, edited 1 time in total.
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: auto re-register db on name or location change

Post by Villeroy »

viewtopic.php?f=21&t=77543 is just another macro with a little GUI and an auto-install module which takes care of the registration, the log-in, the backend location and the driver location.
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
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Re: Auto re-register db on name or location change

Post by gkick »

Thank you, will investigate on the weekend, still using your original folder of one of my first posts which contains part of the FreeHSQL, will need to put my thinking hat on :roll:
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Auto re-register db on name or location change

Post by Villeroy »

Copy the auto install module and the helper module into your document.
Adjust the constants on top of the auto install module.
Assign the document open event to the auto install routine (menu:Tools>Customize... tab "Events")
Now the database document will automatically connect itself to its files, its driver and its registration. The macro does nothing if there is nothing to do.
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
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Re: Auto re-register db on name or location change

Post by gkick »

Danke!
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Post Reply