Frequently asked questions - Base

    From The Document Foundation Wiki
    < Faq‎ | Base

    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:


    This should cause the driver to correctly recognise the parameter, which will allow LibreOffice to correctly load the subform.