Download it now!
Bug 117856 - Firebird: Migration: Simple form-subform Form fails to work after otherwise successful run of migration assistant
Summary: Firebird: Migration: Simple form-subform Form fails to work after otherwise s...
Status: RESOLVED DUPLICATE of bug 117053
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2018-05-28 15:09 UTC by Drew Jensen
Modified: 2018-06-06 18:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

test ODB (14.31 KB, application/vnd.oasis.opendocument.database)
2018-05-28 15:11 UTC, Drew Jensen
Hand migrated ODB with working form (12.09 KB, application/vnd.oasis.opendocument.database)
2018-05-28 15:38 UTC, Drew Jensen

Note You need to log in before you can comment on or make changes to this bug.
Description Drew Jensen 2018-05-28 15:09:34 UTC
Only attaching one file to the issue but there are a few of these that I've run across so far. I can't see why the form would throw the error it does after the assistant is finished. 

Also - the file includes a macro library and this form does have buttons that call into it, but the error happens before any macro code executes. You can run the test with macros disabled if you like.

Steps to Reproduce:
1. Download and open the attached test file
2. Click on tables to start the migration assistant and answer yes when prmpted
3. Assistant runs to completion with no error messages
4. Open the single form in the file

Actual Results:  
Error message:
firebird_sdbc error:
*Dynamic SQL Error
*SQL error code = -206
*Column unknown
*At line 1, column 51
caused by

Main form controls are connected and display data, Sub from table grid is empty.

Expected Results:
Forms works as expected.

Reproducible: Always

User Profile Reset: No

Additional Info:
Tested using Ubuntu 18.04 with build:
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.181 Chrome/66.0.3359.181 Safari/537.36
Comment 1 Drew Jensen 2018-05-28 15:11:02 UTC
Created attachment 142346 [details]
test ODB

Test file includes hsql db, 2 tables, 1 relation and 1 form and simple basic macros.
Comment 2 Drew Jensen 2018-05-28 15:38:09 UTC
Created attachment 142349 [details]
Hand migrated ODB with working form

fist I tried to create a Main/Sub form in the migration assistant created firebird.sdbc file - that fails just like the original form.

Then I opened the original hsldb.sdbc file and created new, empty firebird.sdbc ODB.

Hand migrated the two tables via drag/drop and did the same for the single form - that is attached here. The form works here.

NOTE - I did not hand move either the macros or the relationship, but I did go back and remove the relationship from the migration assistant generated file just in case that was the culprit, but nope still doesn't work.
Comment 3 Julien Nabet 2018-05-28 20:13:34 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
No specific error on console.
I unzipped the odb file, no "LINK_FROM_ID" found with grep.
I must recognize I don't use Base and don't even know how to make a subform.
Comment 4 Drew Jensen 2018-05-30 14:40:22 UTC

*** This bug has been marked as a duplicate of bug 117589 ***
Comment 5 Drew Jensen 2018-06-02 15:41:12 UTC
Ok I reopened this because it is not really a duplicate of the other issue, although it is the same bug but in different code.

The migration assistant today creates initial firebird metadata with name parameter substitution turned off.

Grabbing the little basic script from the closed issue for firebird generally:
Option Explicit
Sub ensureConnection()
	Dim DBDocUI as Object
	on error resume next
	'XRay ThisComponent
	DBDocUI = ThisDatabaseDocument.currentController
	if not DBDocUI.isConnected then
	end if
	on error goto 0
End Sub

Sub Main
	ThisDatabaseDocument.DataSource.Settings.ParameterNameSubstitution = true
End Sub

and running that against the migrated base files does indeed fix this problem, and the forms w/regard to main/sub form access work.
Comment 6 Xisco Faulí 2018-06-06 18:10:08 UTC
The problem started to happen after a29d97e6ddab8ec002ba9827bd5fc874117712e0, thus, not related to Tamás' work. Removing the Blocks section.
Closing as RESOLVED DUPLICATED of bug 117053

*** This bug has been marked as a duplicate of bug 117053 ***