Problem with "Free HSQLDB 0.3.6"

Discuss the database features

Problem with "Free HSQLDB 0.3.6"

Postby dreamquartz » Wed Jul 05, 2017 11:05 pm

Hi Villeroy,

I have a problem with the Macro: FreeForms.
When I try to extract forms in either an internal or a split database, the following is shown:
Screenshot from 2017-07-05 13-46-41.png
and some more of the same type and the macro finishes with
Screenshot from 2017-07-05 13-48-28.png
Screenshot from 2017-07-05 13-48-28.png (10.21 KiB) Viewed 2955 times


The question for the file folder is asked, and made possible, but the resulting file folder is empty.
I tried to rename the Forms, but to no avail.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 644
Joined: Mon May 30, 2011 4:02 am

Re: problem with "Free HSQLDB 0.3.6"

Postby Villeroy » Wed Jul 05, 2017 11:46 pm

LibreOffice changed the API at this point. It is not an easy fix because I have difficulties understanding the changed services.
And yes, my error handling is wrong when it cancels the program but still shows the final success message.

 Edit: I think I got it. I'm too tired right now. Good night. 
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25965
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: problem with "Free HSQLDB 0.3.6"

Postby Villeroy » Thu Jul 06, 2017 6:58 pm

FreeHSQLDB-0.3.7.oxt is mostly compatible with LO. For some reason that can not be revealed by simple debugging, the FreeForms macro fails to connect extracted forms with unregistered databases. OpenOffice still does the trick and the forms extracted from unregistered database by OpenOffice/FreeForms actually work with LibreOffice.

LibreOffice has no problem with the assignment
Code: Select all   Expand viewCollapse view
f.DataSourceName = gDataSourceName

where variable f is a logical (sub-)form but for some reason the assignment does not stick if it is a the URL of the database document. A registered data source name does stick.

For those who are interested, I add my test database here. It contains the same form copied into some folders and subfolders. The form has subforms and subsubforms referencing the same table by means of direct table access, a query, parsed SQL and native SQL. A text field shows the extracted document's path and everything is OK if all the text boxes show the same text as their associated labels.
Attachments
FreeForms.test.odb
Test document for FreeHSQLDB.FreeForms
(69 KiB) Downloaded 49 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25965
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: problem with "Free HSQLDB 0.3.6"

Postby dreamquartz » Fri Jul 07, 2017 8:30 am

Villeroy wrote:FreeHSQLDB-0.3.7.oxt is mostly compatible with LO. For some reason that can not be revealed by simple debugging, the FreeForms macro fails to connect extracted forms with unregistered databases. OpenOffice still does the trick and the forms extracted from unregistered database by OpenOffice/FreeForms actually work with LibreOffice.

LibreOffice has no problem with the assignment
Code: Select all   Expand viewCollapse view
f.DataSourceName = gDataSourceName

where variable f is a logical (sub-)form but for some reason the assignment does not stick if it is a the URL of the database document. A registered data source name does stick.

For those who are interested, I add my test database here. It contains the same form copied into some folders and subfolders. The form has subforms and subsubforms referencing the same table by means of direct table access, a query, parsed SQL and native SQL. A text field shows the extracted document's path and everything is OK if all the text boxes show the same text as their associated labels.


Sorry, but it does not work in OO 4.1.2, LO 5.4.3.2, and LO 5.2.7.2, with FreeForms.test.odb, or any of my databases.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 644
Joined: Mon May 30, 2011 4:02 am

Re: Problem with "Free HSQLDB 0.3.6"

Postby Villeroy » Fri Jul 07, 2017 4:35 pm

"Does not work" does not provide any useful information. What did you do? What did actually happen?

Nevertheless, I found the problem on a Windows system where I do not develop anything. It is GlobalScope.BasicLibraries.loadLibraries("MriLib"). You can safely remove that line. In the code snippets forum I replaced yesterday's oxt with a new one (same version number).

On that Windows system with LO 5.2 I don't see the problem with unregistered sources. So that may be a bug in LO 5.3.
Edit: https://bugs.documentfoundation.org/sho ... ?id=109004
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25965
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem with "Free HSQLDB 0.3.6"

Postby dreamquartz » Sun Jul 09, 2017 8:38 am

Villeroy wrote:"Does not work" does not provide any useful information. What did you do? What did actually happen?

Nevertheless, I found the problem on a Windows system where I do not develop anything. It is GlobalScope.BasicLibraries.loadLibraries("MriLib"). You can safely remove that line. In the code snippets forum I replaced yesterday's oxt with a new one (same version number).

On that Windows system with LO 5.2 I don't see the problem with unregistered sources. So that may be a bug in LO 5.3.
Edit: https://bugs.documentfoundation.org/sho ... ?id=109004

My Bad,
Indeed it also is the case for the GlobalScope in Ubuntu 16.04.
BTW: The updated version does not exist anymore (:
However, editing the Macro, and removing the line, does do the trick under Ubuntu.
Did not check Windows.

Dream
Attachments
LO5.4.3.2-1.png
LO5.3.4.2.png
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 644
Joined: Mon May 30, 2011 4:02 am

Re: Problem with "Free HSQLDB 0.3.6"

Postby Villeroy » Sun Jul 09, 2017 10:24 am

In order to resolve the original problem which originated from internal changes in LibreOffice, I used a helpful tool called "MRI". I loaded the MRI library, analysed the changes in LO and adjusted my code to be compatible with recent versions of both LibreOffice and OpenOffice.

Therefore the line which caused the second problem raising the error message when trying to load MRI where no MRI is availlable. On my system I did not see that message until I tried the macro on a system at my work place where no MRI is installed. If I had had MRI installed on that system I still would not know what the problem on your system was.

The third problem about non-registered databases not being usable with external forms affects LibreOffice 5.3 and it is described in the linked bug report. There is another comment to add to that report: It affects non-registered databases only if those forms had a former life in a database document.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25965
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem with "Free HSQLDB 0.3.6"

Postby dreamquartz » Mon Jul 10, 2017 8:51 am

Villeroy wrote:In order to resolve the original problem which originated from internal changes in LibreOffice, I used a helpful tool called "MRI". I loaded the MRI library, analysed the changes in LO and adjusted my code to be compatible with recent versions of both LibreOffice and OpenOffice.

Therefore the line which caused the second problem raising the error message when trying to load MRI where no MRI is availlable. On my system I did not see that message until I tried the macro on a system at my work place where no MRI is installed. If I had had MRI installed on that system I still would not know what the problem on your system was.

The third problem about non-registered databases not being usable with external forms affects LibreOffice 5.3 and it is described in the linked bug report. There is another comment to add to that report: It affects non-registered databases only if those forms had a former life in a database document.

K,

The DB in question is registered, though. I was able to extract all forms under Ubuntu.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 644
Joined: Mon May 30, 2011 4:02 am

Re: Problem with "Free HSQLDB 0.3.6"

Postby Villeroy » Mon Jul 10, 2017 9:53 am

dreamquartz wrote:The DB in question is registered, though. I was able to extract all forms under Ubuntu.

Dream

Thank you for the feed back and for trying my lousy code.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25965
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Problem with "Free HSQLDB 0.3.6"

Postby dreamquartz » Tue Jul 11, 2017 7:05 pm

Villeroy wrote:
dreamquartz wrote:The DB in question is registered, though. I was able to extract all forms under Ubuntu.

Dream

Thank you for the feed back and for trying my lousy code.

How dare you to talk like that.
You're one of the most appreciated contributors to the community.

I use your so called "lousy code" almost every single day as follows:
1. Laptop (Ubuntu 16.04 LTS), single user
2. Synchronize to USB stick
3. Synchronize USB stick to Desktop (Windows 7 PRO), single user
4. Synchronize to USB
5. Synchronize to Laptop
The reason for this is, that I am very mobile and the database carries a lot of confidential information, I do not want to access over the internet.
I modify the DB structure, update/manipulate data entries at home, my office, and at the "beach"/client's.

This "lousy code" saves my day.
Keep up the GOOD!!!!!!!!! work, and thank you.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 644
Joined: Mon May 30, 2011 4:02 am


Return to Base

Who is online

Users browsing this forum: No registered users and 6 guests