Issue 71951 - SQL error when opening form with sub form (generated by Wizard)
Summary: SQL error when opening form with sub form (generated by Wizard)
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: dbaneedsconfirm
QA Contact: issues@dba
URL:
Keywords: needmoreinfo, oooqa
Depends on:
Blocks:
 
Reported: 2006-11-24 16:40 UTC by emilok
Modified: 2013-08-07 15:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
database with errenous form "sup" (error when opening) (8.79 KB, application/vnd.sun.xml.base)
2006-11-24 17:03 UTC, emilok
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description emilok 2006-11-24 16:40:32 UTC
When opening a form (for viewing) with a super-sub-form relationship, created by
the Form Wizard, the following SQL error is displayed:
"
SQL Status: 37000
Error code:-11

Unexpected token: : in statement
[
SELECT *
FROM "sub"
WHERE (( "idSupSup" = :link_from_idSup)) AND (0 = 1)
]
"

*) The two tables are: "sup" and "sub". "sup" is the "main" form, and "sub" the
sub form.
*) A foreign key has been created using "Tools/Relationships..."
*) The form, as mentioned, is crated using the Wizard. The table "sup" is first
selected, and all its fields. Then "Add subform/Subform based on existing
relation" is selected. Then "Finish" is pressed.

TO REPRODUCE
1. Create a table "sup" with a single field "idSup" (INTEGER) which also is a
primary key.
2. Create a table "sub" with two fields: "idSub" (INTEGER) is a PK, and
"idSupSup" (INTEGER).
3. Use "Tools/Relationships..." to create a relation between the two tables,
using the fields "sup.idSup" and "sub.idSupSup" (the options in the relationship
creation dialog left unchanged).
4. Use the Form Wizard to create a form.
    1. Choose "sup" as the table, select all fields. Press "Next".
    2. Select "Add subform", "Subform based on existing relation" and select the
table "sub".
    3. Press "Finish".

When the form shall be displayed for the first time, the error occurs.
Comment 1 emilok 2006-11-24 17:03:31 UTC
Created attachment 40906 [details]
database with errenous form "sup" (error when opening)
Comment 2 emilok 2006-11-24 17:10:08 UTC
NOTE: I have not tested to create forms without the Wizard (have never done
that), so I don't know if the WIZARD is involved in generating the problem or not!

The problem also appears when opening forms with subforms, created by the
Wizard, by older versions of OOo (2.0.2 or 2.0.3, not sure which of them).

Comment 3 marc.neumann 2006-11-27 08:46:05 UTC
Hi,

I can't reproduce this.

If I open the bugdoc and the form everythings works as expected.

Do you have any more info how to reproduce this.

Which version of OOo do you use?

Bye Marc
Comment 4 emilok 2006-12-03 22:55:12 UTC
Hi.

I am using OOo 2.0.4-5.5.3 from Fedora Core 6 updates.
hsqldb is version hsqldb-1.8.0.4-4jpp.1.
Really I have no more info on how to reproduce. I just open the form, and I
always get this error. I do not know enough about OOo to know how to "decompose"
this use of subforms into smaller testcases.
The only thing I have made is to create forms for only one table using the
wizard, and these works.

Please come with suggestions on how to continue.

Best,
Emil
Comment 5 kpalagin 2007-04-24 09:20:35 UTC
emilok,
both your .odb and step-by-step do not cause specified error message.
Note that in step 4.3 Finish is not available as you have to add some fields 
of "sub".
I have tried 2.04. and 2.2 on Suse 10.2 and 2.3m209 on WinXP.

Resolving as WFM.
Comment 6 kpalagin 2007-04-24 09:32:16 UTC
emilok,
please try version 2.2 and see if you can repro the problem.
Comment 7 emilok 2007-07-01 18:11:54 UTC
Hello kpalagin,

I can not reproduce the error in 2.2! The problem seems to be solved.

/Emil

Comment 8 kpalagin 2007-07-01 18:20:55 UTC
Emil,
thanks for an update.