Bug 119911 - Firebird main-form to sub-form data content not loading.
Summary: Firebird main-form to sub-form data content not loading.
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.0.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-16 21:11 UTC by Carlos Silvestre
Modified: 2018-09-18 17:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test file creatd with LibO 6.0.7 (10.67 KB, application/vnd.oasis.opendocument.database)
2018-09-18 16:07 UTC, Drew Jensen
Details
File after fix for parameter substitution (10.61 KB, application/vnd.oasis.opendocument.database)
2018-09-18 17:25 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Silvestre 2018-09-16 21:11:40 UTC
Description:
When using a main-form and a subform; firebird_sdlbc not loading the data content.   

Steps to Reproduce:
1.Create main table for main form using the create table in design view.  the values are as follow in sql;
Create test (
t_id integer primary key,
testadmin varchar(100)
);
2.Create sub table for sub form sql using the create table in design view.  the values are as follow in sql;: 
Create testrecords (
tr_id integer primary key, 
t_id2 integer references test(t_id),
tdesc varchar(100), 
tdate date
);
3. Click Tools in the tools menu and select relationship. 
4. Click Insert in the tools menu and select add tables.  Select table test & testrecords.  
5. Link t_id to t_id2
6. Save
7. Go to forms and click use wizard to create forms. select table test as main form and add all the fields to fields in form option. 
8. Click Next.
9. Click add subform 
10. Click next
11. select testrecords as subform and add all the the fields to the field in form option. 
12. Click next
13. select t_id in first join main form field.
14. selct t_id2 in first join subform field.
15. click next
16. finish.

Actual Results:
When opening the form. Window pops up with the following message.

The data content could not be loaded.
firebird_sdbc error: 
*dynamic sql error
sql error code = -206
colomn unknown
link from ----
at line 1, column 
caused by isc_dsql_prepare

Expected Results:
main form displays subform content. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Carlos Silvestre 2018-09-17 12:24:28 UTC
Did some further testing. 

Seems to happen only to files created with a previous version of Firebird. File was created from libreoffice 6.0 to libreoffice 6.1
Comment 2 Drew Jensen 2018-09-18 15:57:47 UTC
Confirmed with Ubuntu 18.04
Using Version: 6.0.7.0.0+
Build ID: 3e7dea0348149ae43e5142d5820b094643f39178
to create the example file

Then opening that file with Version: 6.2.0.0.alpha0+
Build ID: 7595fce391ba2aca49db87c93006302d0c2a64f2
will render the form unusable.

I think there is already an issue on this.
Comment 3 Drew Jensen 2018-09-18 16:07:54 UTC
Created attachment 144987 [details]
test file creatd with LibO 6.0.7

The closed issue for this bug is 
https://bugs.documentfoundation.org/show_bug.cgi?id=117053

In fact I closed it when it worked in 6.0.5 but I suppose that is premature.

To be clear, I can work with the form in 6.0.7, the same version the file was created in but not in newer versions of LibreOffice. 

Not sure if this should be a new issue then or if this should re-open the old one.
Comment 4 Drew Jensen 2018-09-18 16:53:53 UTC
After reviewing the comments on the closed issue and some more testing, both with the attached test file and a copy with the parameter substitution setting changed I am not sure if the right answer at this point isn't WONTFIX for version 6.0.x. 

A file created in the newer versions (6.1 and 6.2) will work in the older libreoffice versions, and any existing files created in the affected 6.0.x versions with the fix works in the newer versions and older alike

So IDK is it 'new' or 'wontfix'?
Comment 5 Drew Jensen 2018-09-18 17:25:26 UTC
Created attachment 144990 [details]
File after fix for parameter substitution

So, the way to fix an ODB firebird_sdbc file created with the 6.0.x version of libreoffice so that it works properly here in the later versions 6.1, 6.2 and still runs as expected in the older 6.0 version is to change a parameter in the content.xml section of the file contents. 

Specifically you can unzip the ODB file** and open the internal file content.xml for editing.

Search for the string: db:parameter-name-substitution="false"

Change that to: db:parameter-name-substitution="true"

Save it back into the ODB file. 

**just rename the file from foo.odb to foo.zip works for most OS and then open with your tool of choice.

You can also a macro to do the same - an example of that is found in the closed issue referenced above.

So - I'm going to set to this to resolved and wonfix because I first don't if there sill be another 6.0.x release and even if so if there would be resources to backport a fix. That and given that it is a rather easy onetime fix for 6.0.x created files.
Comment 6 Drew Jensen 2018-09-18 17:27:45 UTC
Changing version number 6.0 as this is where the bug is.
Setting to resolved wontix for the 6.0.x entry.

I won't be hurt if someone overrides that and sets it to 'new' instead.