Windows Libreoffice 6.2.3 - PostgreSQL SDBC driver error

Is there any binary for windows with postgres-sdbc driver for download on www.libreoffice.org?

I downloaded the windows installer and tried to connect to a PostgreSQL db and get this error:
“The connection to the external data source could not be established. No SDBC driver was found for the URL”

Hello,

Could you please clarify on how you tried to connect? Have been using PostgreSQL SDBC on Linux for some time without problem including 6.2.3.2

Hi!
I am using this on Linux too without problem. When i tried to use this connection on Windows, i got this problem. I downloaded the binary for windows on www.libreoffice.org and get this problem. On Linux, i install postgres-sdbc and everything works fine. On windows, i cant find something similar. I was thinking if is possible download the binary of postgres-sdbc driver for windows. If not, maybe the only solution is compile a binary for windows with that option?

Did not need to install anything on Linux for SBDC connection. Was in drop down list each time a version was installed.

Cursory view doesn’t show any bugs outstanding for this. Don’t have current Windows to test (just very old slow version). You may need to file a bug report → Bugzilla

To get this error, i did: (on Windows)

  1. Open Libreoffice Base > Database Wizard
  2. Select “Connect to a existing database” and select “PostgreSQL”. Next
  3. Datasource URL. host=localhost:5432 dbname=mydb . Next
  4. Username and Test connection

at this point i fill the password and get this error:
“A driver is not registered for the URL host=localhost:5432 dbname=mydb”

I tried without testing the connection and get this error.
"SQL Status: HY000

The connection to the external data source could not be established. No SDBC driver was found for the URL host=localhost:5432 dbname=mydb"

Thanks Ratslinger!

@luigibr Using your setting I get similar error. Will test further & post result.

Hello,

Have done some further testing using Mint 18.3 with LO 6.2.3.2.

When creating a NEW Base file with SBDC connection always get error of differing types when trying to test connection. Can save though and then enter connection information ( I used postgresql://localhost:5432/mydb) and this gets a successful connection. May work on Windows also.

Definitely a bug & should be reported.

Note: You can enter info after save from menu - Edit->Database->Properties... & Edit->Database->Connection Type...

Thanks Ratslinger, i tried that and this workaround works on Windows too. Many thanks for your help!

I found the same bug under Debian using LibreOffice 6.2 (AppImage): Bug 125168

As noted in tdf125221 host=localhost dbname=mydb does work contrary to what is noted in Wizard.

However, please note. If a mistake is made on entering information, you will likely get errors until you start from the beginning - meaning close all LO processes including the Base create. Otherwise the error will continue. You can still save as noted in the answer.

Still buggy in my estimation. Along with mentioned errors for mistaken entries, you should be able to specify a port.

It appears every DB connection for Base has its’ own idiosyncrasy! Can set new connection with port using postgresql://localhost:5432/mydb. This has the same problem mentioned in last comment about errors. Enter it correctly the first time and it works. Make any error and you need to start completely over including closing ALL LO open aps.

So I had a similar issue with a Win 10 installation of LibreOffice 7 and Postgres 13. After unsuccessfully trying all of the suggested options outlined here, I read through the LibreOffice Base Guide 6.4 (there is no 7 version yet). In Chapter 2 Creating a Database > PostgreSQL (page 64), step 5, it instructs you to open the pg_hba.conf file and change the connection method from 'ident" to “password”. The location of the config file will be different from what is described in the guide. In my case it was located in the folder I chose to store my Postgres data (D:\PostgreSQL\13\data). In my case the METHOD was “scram-sha-256”, which I changed to “password” and this worked. Unfortunately this means you loose the extra protection of password encryption afforded by “md5” or SCRAM, but this was the only way I could get a connection to work in Windows 10,

@sbosarge,

Currently using PostgreSQL 13 and LO v 7.0.3.1 on Ubuntu 20.04.1 Mate, I have no problem with 'pg_hba.conf file set to md5. I do see the notation in the manual but have no problem. Have not had to modify this setting in any of the versions (LO or PostgreSQL) used and have been using this for at least a few years now.

Well it is possibly just a Windows issue. I changed the config file METHOD to ‘md5’ and still had the same connectivity issue described in my initial answer.