I am using LibreOffice Base as a generic database client. Sometimes it loses its connection to some database. Is there a way to reconnect it? I mean, a way other than closing and reopening Base?
Maybe you have to take look for a parameters to set in the connection, to avoid lose the connection.
I.e.
firebirdsql:oo:localhost:c:/filename.ib?defaultHoldable
is the an url in jdbc connection to Firebir, without the “?defaultHoldable” the connection was losing even while a query is in execution.
That does not sound like a solution. For example, I frequently connect to a database at work and then go home. I would prefer to just click on one button the next day to reconnect, instead of closing and reopening Base. I don’t believe such parameters could solve this problem, for example.
Maybe someone can help, if you explain the situation in detail, for me your comment is different from your post. What your: OS, LibreO version, database, in Base/Calc/Writer?
Well, seeing as you don’t mention which db backend you are using, it makes it kinda hard to offer a reply. Most server backend connections have inactivity timeouts to avoid a given user from hogging a connection, and using in-process memory, when nothing is actually being asked of the server. You would have to look at these parameters if you wanted to maintain a connection to such a server backend, assuming that you had the admin rights to do so, or else fiddle with your driver parameters (if at all supported) :
The link above mentions connection pooling. You can actually turn this on in LO, and sometimes it can help.
This link no longer works. Can anyone please help me to solve the main question?
I have a MySQL backend, and I would like to have a button re-connect to the database server.
In your comment, you say “I would just prefer to click on one button the next day to reconnect”
The only other alternative I can think of at the moment, would be to write a LO basic macro, associated with a button in the Main LibreOffice application window, which would close the ODB database file, and re-open it to re-establish the connection.
Alex
Hi @brandizzi, Has the macro solution proved useful to you? Have more recent builds (e.g. 3.6.x) proved more reliable with db connections?
Hi @brandizzi, Has the macro solution proved useful to you? Have more recent builds (e.g. 3.6.x) proved more reliable with db connections?