You will need a PostgreSQL-database for testing this: 1. Create a table in PostgreSQL: CREATE TABLE "public"."PG_LOconn" ( "ID" serial NOT NULL, "PathName" text NULL, "PicName" text NULL, CONSTRAINT "PG_LOconn_pkey" PRIMARY KEY ("ID") ); 2. Create a form for input data into this table. "PathName" should save the path to the image - so an image-control is needed. "PicName" should save only the name of the image. 3. Insert one row in this table through the form. 4. Create a query like SELECT "ID", "PathName", "PicName", CONCAT( '/home/yourname/', "PicName" ) AS "PicPathName" FROM "public"."PG_LOconn" The first part of the CONCAT-Function should be the same as in "PathName", so could also be a relative link. 5. Open the form for editing, link the form to the query and create a new image-control for "PicPathName". 6. Open the form for input data. Bug: The image of the "PicPathName" won't be shown in PostgreSQL with the native driver. Now change the connection to PostgreSQL to JDBC. The image will be shown in "PicPathName". All tested with Version: 6.2.2.2 Build-ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d CPU-Threads: 6; BS: Linux 4.12; UI-Render: Standard; VCL: gtk3; Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE Calc: threaded on OpenSUSE 15, 64bit rpm Linux
Same misbehaviour here: All tested with Version: 6.1.5.2 Build-ID: 90f8dcf33c87b3705e78202e3df5142b201bd805 CPU-Threads: 4; BS: Linux 4.18; UI-Render: Standard; VCL: kde4; Gebietsschema: de-DE (de_DE.UTF-8); Calc: group threaded on kUBUNTU 18.04
Setting version to 6.1.5.2 and status to NEW. See comment 1.
JDBC I was unable to use the JDBC driver connection to create a form. If I use the wizard, it appears to work, but a form is never saved to the ODB file, just temporary ODT files which then disappear (but appear in the StartCenter and are impossible to load ("missing file" error message). If I try to use the manual form creation, there is no way to bind the form control to the data field of the db table, in the Control Properties Data tab, no fields are visible, and I can not activate the general form properties to point to a table to which to bind the form. Direct PG Driver I was able to create a form using the wizard, then modify the controls on the form. However, replacing the original text control with an image control, saving the form, then opening the form in data entry mode to enter a first record causes LO to hang after I click on the image control, point to an image (e.g. EPS image), which is displayed, and then attempt to write the record set to the database. In my case, instead of writing the path, it appears to try and write binary data to the field defined as TEXT. I am then forced to quit LO, and no image data or image path is saved to the database - a query on the table "SELECT * from PG_LOconn" via pgconsole also shows that the field pathname seems to contain an endless stream of nothing - here again, I am forced to quit the console with the q command to regain control. Seems that there are more problems on macOS with such a setup.
(In reply to Alex Thurgood from comment #3) > Seems that there are more problems on macOS with such a setup. We don't have this problem with Linux (OpenSUSE and Kubuntu). So it seems there are a lot more bugs with macOS/Base/PostgreSQL. Seems this combination isn't usable at all.
So, today, when I open the same PG-JDBC-ODB file that I created yesterday and was having so many issues with, I can create a form using the wizard, and I see the binary data represented in the text field. Go figure ! I'm going to retest everything I did yesterday.
Well, nothing I seem to choose on macOS as path separators '/' or '\' seems to work to form a valid URL that will display the image in an Image Control, irrespective of JDBC-PG or native PG driver. I never see an image in the basic image control bound to PathName, and the image control bound to the query with concat just shows a transparent control with a border (not even the grey background, even though this is defined in the control's properties). Clearly, there are some other issues on macOS.
Problem seems to be PostgreSQL doesn't set the datatype the right way. If I change the query to 4. Create a query like SELECT "ID", "PathName", "PicName", CONCAT( '/home/yourname/', "PicName" ) AS "PicPathName" FROM "public"."PG_LOconn" tO SELECT "ID", "PathName", "PicName", CAST(CONCAT( '/home/yourname/', "PicName" ) AS VARCHAR(100)) AS "PicPathName" FROM "public"."PG_LOconn" it will work. So I will close this bug as WORKSFORME.