Created attachment 178443 [details] Package with SQL-code for tables and 2 form (direct and JDBC connection) There are some more bugs about PostgreSQL and subforms. This is a bug special for forms, which will contain a MainForm, a SubForm and a SubSubForm (subform of the subform). Download the attached package, which contains SQL-Code for creating 3 Tables in PostgreSQL and fill on of the tables with first data. Connect the database files to PostgreSQL. One file should be connected directly with internal driver, the other through JDBC. You only have to change the connection string in Edit → Database → Connection Type. Open the form with direct connection. Will open without problems. Open the form with JDBC. Will throw an error, because there seem to be something with integer and varchar values … Type an ID for the town and a town in the subform. You couldn't type somethin in the subsubform, because it isn't connected to the subform. Close the form, reopen the form. Now you could add data to the subsubform, special a name for the person. This behavior could only be worked arround by connecting to a field, which is defined as Varchar like: SELECT "tbl_Person".*, CAST( "ID" AS VARCHAR ( 10 ) ) AS "ID2" FROM "tbl_Person" And get the value for the connected field for new rows by macro code from the subform. Tested with LO 7.3.1.1 on OpenSUSE 15.3 64bit rpm Linux
Created attachment 178444 [details] Screenshot of error in subsubform, if subform without content.
Hi Robert, The SQL DDL is failing for me with this line when operating from a postgres session terminal on macOS (psql 10.20): SET default_table_access_method = heap; ERROR: unrecognized configuration parameter "default_table_access_method" Is this statement absolutely necessary ?
I ignore the failed DDL statement and ran the remainder without problem. I can confirm that I got an error message on first opening of the JDBC connected form. However, I could enter a town ID and a town, without error, and that data was saved to the corresponding table - so the subform works for me in the JDBC connection apart from that initial error message. Version: 7.2.6.2 / LibreOffice Community Build ID: b0ec3a565991f7569a5a7f5d24fed7f52653d754 CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded
There's definitely something weird going on though: - the first town ID / town entry was saved to the table; - however, the second one I entered via the subform, which is visible in the town table, is not visible in the form... When I try adding a 3rd town entry, I get an error message about a constraint violation, my previous 1st record townID gets overwritten with a different value, and my previously 2nd town entry gets overwritten with the 3rd entry.
(In reply to Alex Thurgood from comment #3) > I ignore the failed DDL statement and ran the remainder without problem. > > I can confirm that I got an error message on first opening of the JDBC > connected form. > > However, I could enter a town ID and a town, without error, and that data > was saved to the corresponding table - so the subform works for me in the > JDBC connection apart from that initial error message. > The error is an error for the subsubform, adding a person to the town (3rd row). I will get this error, if there is no row in the subform. If you add a row in the subform you won't get a connection to the subsubform, special in the form: Nothing appears in Town_ID. If you close the form and reopen after a town has been added a value in Town_ID will appear.
This is the error I get on opening the JDBC connected form: Statut SQL: 42883 ERROR: operator does not exist: integer = character varying Indice : No operator matches the given name and argument type(s). You might need to add explicit type casts. Position : 79 and then indeed, there is no connection to the subsubform if no subform data is provided beforehand. Confirming.
Same here, using LibreOffice 7.3.6.2