Page 1 of 1

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

PostPosted: Tue Nov 12, 2019 10:23 pm
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

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

PostPosted: Tue Nov 12, 2019 11:23 pm
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.

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

PostPosted: Wed Nov 13, 2019 7:48 am
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:

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

PostPosted: Wed Nov 13, 2019 12:40 pm
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.

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

PostPosted: Wed Nov 13, 2019 5:26 pm
by gkick
Danke!