[Solved] Connection to data source could not be established

Discuss the database features

[Solved] Connection to data source could not be established

Postby BrianBonzo » Sun Oct 08, 2017 6:36 am

Yesterday was working away very happily in base, closed the program and went to bed. The next day open my file but with no tables, forms or queries there. Clicked on tables and I got the error message "connection to the data source could not be established". I also noted that along the bottom of the window that HSQL had been replaced with JDBC (I think).

Searched the web but found no solution. Please help! Is all my data now lost? :(
Last edited by Hagar Delest on Thu Oct 12, 2017 9:59 pm, edited 1 time in total.
Reason: tagged [Solved].
BrianBonzo
 
Posts: 6
Joined: Sun Oct 08, 2017 6:20 am

Re: The connection to the data source could not be establish

Postby BrianBonzo » Sun Oct 08, 2017 4:03 pm

Update - Reinstalled open office, reinstalled JRE 32 bit but still same problem.

I think the real issue is that along the base of the window embedded database and HSQL have for some unknown reason has been replaced by JDBC JDBC so hence the connectivity problem. The issue is how do I change JDBC JDBC back to embedded and the HSQL database engine?

Any help would be really appreciated. Thanks.
Open Office 4.1.3 on Windows 10
BrianBonzo
 
Posts: 6
Joined: Sun Oct 08, 2017 6:20 am

Re: The connection to the data source could not be establish

Postby Villeroy » Sun Oct 08, 2017 4:10 pm

[Python] Macro to extract and reconnect embedded HSQLDB
Now there is also a "Revert_To_Embedded" routine which can be used to reconnect the document to its embedded HSQLDB if it exists within the document container.

If the embedded db is still intact, I would definitively go for the stand-alone database. It is much more stable and the office suite can't kill the whole db anymore.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24592
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The connection to the data source could not be establish

Postby BrianBonzo » Mon Oct 09, 2017 6:31 am

Thanks a million for your post. Used the python module as you suggested and EXCELLENT at least got my tables back but no queries or forms. How do I get these back? Thanks, Brian :)
Open Office 4.1.3 on Windows 10
BrianBonzo
 
Posts: 6
Joined: Sun Oct 08, 2017 6:20 am

Re: The connection to the data source could not be establish

Postby Villeroy » Mon Oct 09, 2017 10:30 am

BrianBonzo wrote:Thanks a million for your post. Used the python module as you suggested and EXCELLENT at least got my tables back but no queries or forms. How do I get these back? Thanks, Brian :)

I guess your database document crashed and it was pure luck that your embedded database remained intact. I would expect that any modifications of the last session are lost. I can't tell anything about queries and forms. For any productive work regular backups are a matter of course. With Base you should use external databases rather than embedded ones. When you open an embedded database it is "installed" into a temporary directory and used like an external database. When you quit editing data, the database is wrapped back into the Base document. The constant wrapping and unwrapping of a potentially huge database is problematic.

If you have some older backup document with the forms and queries:
1) Extract your embedded database from the fixed document. You have a macro that is able to do that.
2) Rename the fixed document and restore a database document with forms and queries from a backup. Store the backup copy where the fixed document used to be.
3) Open the database with forms and queries and run the macro again. When prompted how to proceed, choose the option to connect the current database document with the already existing external database (no extraction, keep existing files and connect).

Now you have the old backup document connected with the database of the fixed document.

Alternatively you can use my FreeHSQL tool. It provides a little GUI which allows you to connect any existing database document in any folder with an external HSQLDB in any other folder and regardless of the file name. The simple Python macro assumes equal base names in subdirectory "database".

 Edit: P.S. Your odb file is a zip archive. Query strings are stored in content.xml. Forms are stored in a subfolder with a corresponding entry in content.xml. 
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24592
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The connection to the data source could not be establish

Postby BrianBonzo » Tue Oct 10, 2017 6:12 am

Unfortunately I did not make a backup of my odb. Silly me!!!!!!!!!!!!!!!!!!
Open Office 4.1.3 on Windows 10
BrianBonzo
 
Posts: 6
Joined: Sun Oct 08, 2017 6:20 am

Re: The connection to the data source could not be establish

Postby UnklDonald418 » Tue Oct 10, 2017 6:10 pm

Go to Tools->Options->Open Office->Paths to find the path to where automatic Backups are stored.
With a little luck there might be something there.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the subject line
Apache OpenOffice 4.1.4 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 580
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: The connection to the data source could not be establish

Postby BrianBonzo » Tue Oct 10, 2017 7:07 pm

You are both a genius and my savior. Found a 8 day old auto backup with my forms and queries intact. Data was a bit out of date though. So now I have an odb with external database and all data current, then an old embedded database odb but with the correct Forms and Queries. Now need my Forms with the current data. How best can I do this?

I must admit I was seriously thinking of giving up on Open Office base but now my faith has been restored somewhat by two excellent Forum members. Thanks to you both.
Open Office 4.1.3 on Windows 10
BrianBonzo
 
Posts: 6
Joined: Sun Oct 08, 2017 6:20 am

Re: The connection to the data source could not be establish

Postby UnklDonald418 » Tue Oct 10, 2017 9:11 pm

To copy a Form just click on the Form in your embedded database and drag it into the Forms area on the external database. It works the same with Queries and Reports.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the subject line
Apache OpenOffice 4.1.4 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 580
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: The connection to the data source could not be establish

Postby BrianBonzo » Wed Oct 11, 2017 4:36 am

:bravo: SOLVED Up and running again thanks to Forum help. Much appreciated.
Open Office 4.1.3 on Windows 10
BrianBonzo
 
Posts: 6
Joined: Sun Oct 08, 2017 6:20 am


Return to Base

Who is online

Users browsing this forum: No registered users and 3 guests