Issue 96703 - Form-subform relation fails with direct SQL
Summary: Form-subform relation fails with direct SQL
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.0
Hardware: Unknown All
: P3 Trivial with 3 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2008-11-29 08:27 UTC by villeroy
Modified: 2013-01-29 22:01 UTC (History)
1 user (show)

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

Form and subform bound to queries. (11.05 KB, text/plain)
2008-11-29 19:24 UTC, villeroy
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description villeroy 2008-11-29 08:27:36 UTC
Load any form with a subform and change the source type of either one to some
unparsed SQL query. For instance, change (sub-) form's source from "TableX" to
direct SQL SELECT * FROM "TableX". The subform won't follow the main form anymore.
Comment 1 leggewie 2008-11-29 17:40:41 UTC
Maybe you can attach a test case?
Comment 2 villeroy 2008-11-29 19:21:32 UTC
Open the form of the attached database.
Jump from item to item and watch the subform showing the category of the
selected item. Close the form.
Open any of the queries in SQL view and turn on direct SQL mode (Edit menu).
Store the query and open the form again. The categories are not bound to the
items anymore.
Comment 3 villeroy 2008-11-29 19:24:01 UTC
Created attachment 58393 [details]
Form and subform bound to queries.
Comment 4 eremmel 2009-03-15 23:50:13 UTC
A workaround is to implement the Direct-SQL query as an view and use the view in
the sub-form. This is however limited to read-only form-subform relations.
Comment 5 villeroy 2009-03-16 00:02:19 UTC
Thanks for the work-around. Direct SQL-queries are read-only too. So this
limitation does not make any difference. But why is almost every row set
read-only in this database tool? 
Comment 6 bobban 2009-10-06 15:35:20 UTC
Just want to confirm that I have also been burnt by this bug. Any use of Direct
Mode SQL queryies in a linked form breaks the linkage. However a form based
solely on this query is ok. A thread which details my own experience with
discovering this bug here