« MBS Real Studio Plugi… | Home | Map of blog readers »

How to get SQL Plugin running with Postgre SQL on Windows?

Our SQL Plugin can connect to a lot of different databases. This includes Postgre SQL. But as with all databases, you need to tell the library where to find the connector library, what database type you connect to and the connection string.

So first, you need to load the database library. Our postgresql example shows the line to locate the library:

db.SetFileOption SQLConnectionMBS.kOptionLibraryPostgreSQL, getfolderitem("libpq.dylib")

This is for Mac OS X as you see on the dylib. Change that to ".dll" on Windows. And maybe also change path to your favorite location?

To get the libraries, please go to postgre sql website and download the 32 bit version for Windows. Even if your server is 64 bit, you need the 32 bit dll. From the download, simply copy this dlls: libpq.dll, ssleay32.dll, libeay32.dll, libintl-8.dll and libiconv-2.dll. Put them all in the application directory, so the application can find them.

Tip: Don't download the installer. Simply download the binaries zip archive, you can delete the other files.

Next you want to get a connection string. It looks like you pass "host:port@database". The biggest plugin in space...
18 12 11 - 15:16