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

Creating and using forms

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

Postby gkick » Tue Nov 12, 2019 10:23 pm

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.2 on Windows 10 HSQL 2.5 backend
gkick
 
Posts: 238
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

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

Postby Villeroy » Tue Nov 12, 2019 11:23 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28358
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Postby gkick » Wed Nov 13, 2019 7:48 am

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.2 on Windows 10 HSQL 2.5 backend
gkick
 
Posts: 238
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

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

Postby Villeroy » Wed Nov 13, 2019 12:40 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28358
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Postby gkick » Wed Nov 13, 2019 5:26 pm

Danke!
Libre Office 6.2 on Windows 10 HSQL 2.5 backend
gkick
 
Posts: 238
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile


Return to Forms

Who is online

Users browsing this forum: No registered users and 4 guests