Apache OpenOffice (AOO) Bugzilla – Issue 71951
SQL error when opening form with sub form (generated by Wizard)
Last modified: 2013-08-07 15:45:17 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.
Created attachment 40906 [details] database with errenous form "sup" (error when opening)
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).
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
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
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.
emilok, please try version 2.2 and see if you can repro the problem.
Hello kpalagin, I can not reproduce the error in 2.2! The problem seems to be solved. /Emil
Emil, thanks for an update.