Bug 50747 - JDBC connector with subforms do not work, when there is no value in mainform (PostgreSQL, MySQL ...)
Summary: JDBC connector with subforms do not work, when there is no value in mainform ...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 56358 (view as bug list)
Depends on:
Blocks: Database-Connectivity
  Show dependency treegraph
 
Reported: 2012-06-05 13:24 UTC by Matt Wheeler
Modified: 2022-12-12 17:02 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Wheeler 2012-06-05 13:24:15 UTC
If I select the "JDBC" type of connection and enter a URL for my MySQL database, subforms stop working. This happens both for forms generated with the wizard and forms built from scratch in design view.

If the "MySQL (JDBC)" connection type is used instead, the same form with subforms works perfectly (however, this connection type does not support storing a password for the database, so it is unsuitable for my use case).

The error messages displayed when clicking on "More detail" are:


Error:
The data content could not be loaded.


Error:
SQL Status: S1009

Parameter index out of range (1 > number of parameters, which is 0).


Information:
The SQL command leading to this error is:

SELECT * FROM `prm_test`.`addresses` WHERE ( `personID` = :link_from_ID )
Comment 1 Jochen 2012-08-28 18:52:18 UTC
@Robert,

please: have a look at this bugreport. Can you confirm the behavior?
Comment 2 Robert Großkopf 2013-01-22 20:42:26 UTC
Have tested it with MySQL and JDBC (not the JDBC integrated, as described) Seems to be the same problem as reported with PostgreSQL and JDBC. Must be the JDBC-driver of LO.
I will mark
https://bugs.freedesktop.org/show_bug.cgi?id=56358
as a duplicate of this bug and change the titel to all connections of databases with JDBC.
Comment 3 Robert Großkopf 2013-01-22 20:45:16 UTC
*** Bug 56358 has been marked as a duplicate of this bug. ***
Comment 4 Robert Großkopf 2013-01-22 20:48:48 UTC
Changed the version to LO 3.3.4. It the same behavior in all LO-versions I have tested - the eldest version is LO 3.3.4.
Comment 5 Lionel Elie Mamane 2013-04-15 08:36:54 UTC
In menu Edit / Database / Advanced Settings, tab "Special Settings", check the box next to "Replace named parameters with '?'"
Comment 6 Jean-Paul 2019-08-25 09:11:29 UTC
Hello,

I am running LO 6.3.0.4.

In menu Edit / Database / Advanced Settings, tab "Special Settings", 

I don't have a box "Replace named parameters with '?'"

What can I do?
Comment 7 Robert Großkopf 2019-08-25 10:32:01 UTC
(In reply to jnplg from comment #6)
> Hello,
> 
> I am running LO 6.3.0.4.
> 
> In menu Edit / Database / Advanced Settings, tab "Special Settings", 
> 
> I don't have a box "Replace named parameters with '?'"
> 
> What can I do?

Open the *.odb-file with a packing-program. Edit the file content.xml.
db: parameter-name-substitution = "false"
must be set to "true" or could completely been removed.
Comment 8 Robert Großkopf 2022-12-12 17:02:19 UTC
Is there any reason why there isn't set
parameter-name-substitution = "true" 
as default in
Edit → Database → Advanced Settings → Special Setting → Replace named parameters with '?'
?

… or should I close this bug as WORKSFORME and set up a new description with a feature request?