Ask Your Question
1

How to make LibreOffice Base reconnect to a database

asked 2012-05-23 16:50:17 +0200

brandizzi gravatar image brandizzi
11 2

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?

delete close flag offensive retag edit

3 Answers

Sort by » oldest newest most voted
1

answered 2012-06-21 10:35:38 +0200

Alex Thurgood gravatar image Alex Thurgood
166 8 3

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) :

http://mysqlpreacher.com/wordpress/2010/06/mysql-jdbc-connector-autoreconnecttrue/

The link above mentions connection pooling. You can actually turn this on in LO, and sometimes it can help.

link delete flag offensive edit
1

answered 2012-05-23 23:41:13 +0200

mariosv gravatar image mariosv flag of Spain
4644 20 46

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.

link delete flag offensive edit

Comments

1

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.

brandizzi ( 2012-05-24 15:11:40 +0200 )edit

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?

mariosv ( 2012-05-25 10:54:57 +0200 )edit
1

answered 2012-07-23 12:15:41 +0200

Alex Thurgood gravatar image Alex Thurgood
166 8 3

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

link delete flag offensive edit

Comments

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?

qubit ( 2013-01-27 19:44:20 +0200 )edit

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?

qubit ( 2013-01-27 19:44:35 +0200 )edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-05-23 16:50:17 +0200

Seen: 299 times

Last updated: Jul 23 '12