Correct Postgresql setup

What’s the correct method to get the postgresql driver working? It works on my older VM (Delphi XE8) but I’ve not been able to get it working on the new (D12) VM. The app works fine, it’s just the connection manager part of SM that fails.
If I add the debug setting to RemObjects.DataAbstract.Unmanaged.ini, and the error is this:

TConnectionTesterThread.Execute: EROUnknownExceptionReceivedFromServer, [FireDAC][Phys][PG]-314. Cannot load vendor library [libpq.dll]. The specified module could not be found.
Hint: check it is in the PATH or application EXE directories, and has x86 bitness.

I have the 32-bit version of libpq.dll in the windows\SysWOW64 folder and I’ve also tried creating a specific folder for it and adding that to the path, but still no joy.

Hi,

Does FireDAC able to connect to PostgreSQL w/o DataAbstract?
I can suggest to launch Dependency Walker and see if libpq.dll is depended on other dll (like msvcr90.dll, etc) that isn’t present on your pc

No, it wasn’t.

This wasn’t present. Sorted now, thanks very much once again.

@EvgenyK , As an update to this one, is it possible to get SM to connect to the 64-bit Postgresql? I don’t seem to be able to get SM to load the 64-bit libpq.dll as it says it’s not 32-bit of course. However, the 32-bit version of it won’t connect to version 16 of postgresql as it will only work with 64-bit.

Hi,

as a temporary workaround, you can use .net driver for filling schema info.

in runtime you can use your FireDAC connection string.

So, I can’t use schema modeller ? Runtime is fine, it works brilliantly, I’m talking about adding a new table to my schema in my Delphi server, which edits the dfm so not sure how the .net would do that?

I’ve been doing it myself by editing the DFM directly but it’s a bit slow.

Hi,

I mean - use .NET driver inside Schema Modeler:

You should be able to add a new table into existing schema

1 Like

Oh, I see, I’ve never even downloaded the .Net DA, so I assume that option will appear if I do and then install that. I’ll try it, thanks Eugene.

Hi,

.1593 will include Schema Modeler x64.

You can add into DataAbstract_user.inc:

// use x64 DASM instead of x86 DASM
{$DEFINE USE_DASM_X64}

as a result, Schema Modeler x64 will be used by default at editing TDASchema (after installing .1593).

Known issue: New Project wizard still uses 32-bit Schema Modeler.

1 Like

Hi,

Does it work for you?

So this is the empty file in \Data Abstract for Delphi\Source ?
Do I have to do anything else? If not, then no it still opens the x86 one.
Using Delphi 12.1.

Hi,

this file stores your personal settings between different versions of Data Abstract. We don’t modify this file in installer.

have you installed .1593?

Yes, sorry should have said.

Hi,

hmm, works for me:

have you added {$DEFINE USE_DASM_X64} before or after installing .1593?

if before - it will work just after installing .1593
if after - launch C:\Program Files (x86)\RemObjects Software\Build\install_DA.cmd with admin rights for rebuilding DA packages

Ah, I had already installed it, and assumed it read the ini file on launch.

It now work, yes, thanks for the info. It doesn’t seem to like the DBISAM connections I have in the same project though.

Access violation in module ‘RemObjects.DataAbstract.Unmanaged.dll’.

Hi,

hmm. it works locally.


you can build DADBISAM4Drv.dpr with your version of DBISAM for Win64 platform.

created DADBISAM4Drv.dad should be put to C:\Program Files (x86)\RemObjects Software\Data Abstract (Common)\Bin\x64 folder.