I last used SQLPostgresMBS for Windows apps in Xojo 2019 where I could get by with using the InternalPostgresSQLLibrary, but “This item is deprecated and should no longer be used. You can use postgres driver libraries instead.”
So in a clean new Win10 64-bit install, clean Xojo 2021R2.1 install, and MBS 21.4 plugins, tried the MBS example “SQLDatabaseMBS PostgresSQL Connect”.
It appears to be aimed at macOS users. If I change the FindFile for libpg.5.1.dylib and switch to libpq.dll and add a CopyFiles build step to insert libpq.dll under debug the FindFile does indeed find my libpq.dll yet it fails with:
libpq.dll: The specified module could not be found
DBMS API Library loading fails
This library is part of DBMS client installation, not SQLAPI++
Make sure DBMS client is installed and
this required library is available for dynamic loading.
What kOptionLibraryPostgreSQL options need to be set for using Postgres under Win10 with SQLConnectionMBS class?
The MBS example project can be used to demonstrate the error, though you need to change the App Open event FindFile to libpq.dll, and a CopyFiles build step to make the file available. (Or change the FindFile() to the installed dll location.)
Postgres since version 11 is only available in 64 bit binaries for Windows. So my libpq.dll is from a 64 bit build of Postgres.
I’ve tried both 64-bit and 32-bit builds in Xojo, but assume I should use 64 bit if the Postgres installation is 64 bit.
Any pointers on getting SQLDatabaseMBS connections to work in Win10 with Xojo 2021R2?