# All my Sub Forms stopped working after switching to JDBC connection

I had a working base application using MySQL (JDBC) connection type. I tried switching to a JDBC connection type to add SSL security as described here .

The connection is ok, all tables, views and Base queries work fine as well as the Forms without sub forms.

When opening any of my forms containing a sub form, I get the following error message:

SQL Status: S1009

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

It seems to match the problem described in this Stack Overflow post . It is the basic error that happens in every code language I played around with when you have a string with placeholders, and do not pass it a matching number of parameters.

My forms are linked to their sub forms using the LO Base Link Master/Slave fields GUI settings, no macro is involved in that process.

My question is : Is there something I can do to fix it, Is it a Lo Base JDBC limitation/bug?

Basically should I give up on ssl encryption?

edit retag close merge delete

I am adding this comment, because after testing out, I found that there is no link to the ssl parameters. My JDBC connection is not working. I removed ssl encryption from the server, and the jdbc connection string parameters, the problem remains the same.

( 2019-05-26 11:59:03 +0200 )edit

It is apparently an old bug as documented here. I am finding a lot of posts, but no working solutions; MySQL analyse yes/no in subforms settings do not change anything, And tweaks to database advanced properties were unsuccessful so far.

( 2019-05-26 12:21:18 +0200 )edit

Sort by » oldest newest most voted

The solution I have found here seems to be working well.

Edit > Database > Advanced Settings > Replace named parameters with '?' (Checked)

Important: you need to close the Base document and reopen it for changes to take effect.

more

I do not see the setting in Edit > Advanced Settings ; I am running LO 6.3.0.4 and I see 5 other settings (in the Special Settings tab, which is the only tab), not the "Replace named parameters with '?'". Please advise.

( 2019-08-25 10:56:16 +0200 )edit

There is a setting in the .obd file that is incorrect and can be manually updated. The setting is contained in the file content.xml located in the .odb file archive. The exact process is described in Comment #11 at the bug report linked below[1]:

1) Unzip the .odb
2) edit content.xml
3) replace
<db:driver-settings db:parameter-name-substitution="false" />
by
<db:driver-settings db:parameter-name-substitution="true" />
4) repack (rezip) the odb with the new content.xml

more