Error with subform

Discuss the database features

Error with subform

Postby kenwong » Tue Feb 26, 2019 6:02 pm

I connect Libreoffice ( Base to a database in PostgreSQL (11.2) via JDBC.

I made two forms with subforms without any issue. Now I get an error with the third form with subform. I created the form and subform by using the Form Navigator, specified the master and slave fields, saved the forms. Everytime when I open the form, the error message pops up, saying:

The data content could not be loaded. ERROR: operator does not exist: integer = character varying Hint: No operator matches the given name and argument types. You might need to add explicit type casts. Position: 92

Further, the SQL Status is 42883.

"Replace named parameters with '?'" has been ticked.

Thanks in advance for any help.
Libreoffice on Windows 10
Posts: 3
Joined: Tue Feb 26, 2019 5:51 pm

Re: Error with subform

Postby Villeroy » Tue Feb 26, 2019 9:48 pm

With form-subform relations you should use named parameters in "parsed mode". These relations don't work in "direct SQL mode" where the SQL is interpreted by the database backend.

The SQL syntax in parsed mode is the same syntax as used with the built-in HSQL, for instance:
SELECT "Case sensitive name in dbl-quotes" FROM "Table" WHERE UPPER( :Named_Parameter ) = UPPER("Field Name")
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Posts: 26751
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Error with subform

Postby kenwong » Wed Feb 27, 2019 5:32 pm

Thanks Villeroy.

I forgot to give more details in my first post. There was no the error with only the main form in place, and even up to the point where I added the sub-form and I specified the underlying table for the sub-form. Once I input the master and slave fields in the form Properties, the error was thrown out when I opened the form for data input.

I have just resolved the issue. Previosly I input only the column names in the master and slave fields. Now I include the table name before each of the column names, like "table_name"."column_name", and the form opens with no issue.

Hope the above would help those who might be faced with the similar problem.
Libreoffice on Windows 10
Posts: 3
Joined: Tue Feb 26, 2019 5:51 pm

Return to Base

Who is online

Users browsing this forum: No registered users and 2 guests