| View previous topic :: View next topic |
| Author |
Message |
weiqingh Newbie

Joined: 22 Jun 2012 Posts: 4
|
Posted: Fri Jun 22, 2012 5:09 am Post subject: how to reconnect to the database after connection is closed |
|
|
hi there,
I have registered a database connection to a mysql server in calc and I can see all the tables in the "Data Sources" view. I was able to drag a table to a cell and display all the rows of that table in the sheet. I can run "refresh range" too.
However, after having the file open for a few days, I got an error trying to access the table from calc: "The data content could not be loaded. No operations allowed after connection closed". I tried to disconnect the database (in the "data source" view) and then double click on it again. but I still got the same error. How do I reconnect to the database?
Thanks, |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri Jun 22, 2012 11:53 am Post subject: |
|
|
Are you sure that the database is still reachable?
What happens when you restart the office suite (mind the nasty quick-starter)?
You may try connection pooling (Tools>Options>Base>Connections) _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
weiqingh Newbie

Joined: 22 Jun 2012 Posts: 4
|
Posted: Fri Jun 22, 2012 12:20 pm Post subject: |
|
|
Thanks for your reply.
Yes I am sure the database is still running -- I could open a mysql client and connect to it. As of now, the only way to get back the database connection is to re-create a brand new database and then link a sheet/cell to it again.
I am also trying to figure out if connection pool would help me. The problem is that when I created the database, I used com.mysql.jdbc.Driver as my driver class ( I specified a classpath pointing to the jar containing that class). but that class is not listed under any of the classes in the conection pool page.
If I tried to use classes listed in the connection pool page to create my database, e.g. org.openoffice.comp.drivers.MySQLDriver or com.sun.star.comp.sdbc.JDBCDriver, I got an error saying the class cannot be loaded correctly.
I am also curious why would connection pool help the problem. there is also a timeout associated with the pool. |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri Jun 22, 2012 1:54 pm Post subject: |
|
|
Forget the connection pooling. Silly me. I have no clue why your connection breaks. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
weiqingh Newbie

Joined: 22 Jun 2012 Posts: 4
|
Posted: Tue Jun 26, 2012 5:29 am Post subject: |
|
|
| I think the problem might be that I have not saved the password for mysql database. When I created the connection, there is an option to test the connection and I have put my password there and the connection test was successful. But there is no checkbox or any other option to save the password. Did I miss something? |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Tue Jun 26, 2012 5:50 am Post subject: |
|
|
Nothing wrong. Whoever tries to connect to your database will be prompted for the password. Of course OOo does not store the password, otherwise a copy of your Base document could be used as access key. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Tue Jun 26, 2012 5:50 am Post subject: |
|
|
Nothing wrong. Whoever tries to connect to your database will be prompted for the password. Of course OOo does not store the password, otherwise a copy of your Base document could be used as access key. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
weiqingh Newbie

Joined: 22 Jun 2012 Posts: 4
|
Posted: Tue Jun 26, 2012 5:53 am Post subject: |
|
|
| Understood. but my point is that given it doesn't save the password, when it tried to re-connect to the database later, I never got a prompt for inputting my password again. |
|
| Back to top |
|
 |
|