MBS SQL Plugin - Connecting to postgresql in iOS

Hi,

Is there anyone tried or been able to connect to a postgresql DB in a iOS apps with MBS SQL plugin?

I’ve tried to modifiy the CubeSQL example, adding the postgresql dylib in the framework as instructed but I always have this error:

libpq.so: dlopen(libpq.so, 1): image not found
libpq.so.5: dlopen(libpq.so.5, 1): image not found
libpq.so.4: dlopen(libpq.so.4, 1): image not found
libpq.so.3: dlopen(libpq.so.3, 1): image not found

DBMS API Library loading fails
This library is a part of DBMS client installation, not SQLAPI++
Make sure DBMS client is installed and
this required library is available for dynamic loading

Thanks

You need a Postgres Client library.
Have you tried the internal one?

if InternalPostgreSQLLibraryMBS.Use then
  MsgBox "Using internal PostgreSQL."
else
  MsgBox "Failed, so please use library file."
end if

I have added the line

call InternalPostgreSQLLibraryMBS.Use

and everything worked.

Initially I thought that function was not avalaible because of the list that presented when I type Internal… and tab

image

My bad!

Thanks

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.