Frequently asked questions - Base
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
When I open a main form containing a sub-form, an error appears stating that the number of parameters does not correspond(ODBC/JDBC connection)
Some database drivers do not allow the user to carry out queries with names parameters. For example :
SELECT * FROM TABLE_X WHERE ID=:id. In this example,
:id is a named parameter, but the driver returns an error message that no such parameter exists.
To instruct LibreOffice to not used named parameters, go to menu Edit / Database / Advanced Settings; in the "Special Settings" tab, check the box "Replace named parameters with '?'".
In this case, LibreOffice then instructs the driver to execute:
SELECT * FROM TABLE_X WHERE ID=?
This should cause the driver to correctly recognise the parameter, which will allow LibreOffice to correctly load the subform.