« New Toys from Apple | Home | MBS Filemaker Plugin,… »

Connection Strings

If you use our SQL plugins, you sometimes have trouble connecting. And so far 99% of our users who had trouble with our SQL plugin do just need to find the right connection string. Because if you pass in wrong format for the connection string, you just get an error, often not even a helpful error message.

Here a few sample connection strings:

DB2:
Driver={IBM DB2 ODBC DRIVER};Database=urDataBase;Hostname=yourServerAddress;Port=1234; Protocol=TCPIP;Uid=yourUsername;Pwd=yourPassword;

MySQL:
192.168.1.80:3306@test

PostgreSQL:
127.0.0.1:5432@TestDB

SQLite:
/Databases/test.db

Microsoft SQL Server direct:
PcName\SqlServerInstanceName@DatabaseName

As you see some databases use a ODBC style, some just IP or DNS Name with port and database name after the @ character. SQLite simply uses the path to the database file. And for Microsoft SQL Server, you need to know the instance name and the database name.

For some services, you can include the password in the connection string. In general we avoid that and pass the password through the password property/parameter. This way you can still show the connection string somewhere.

If you use SQLDatabaseMBS class in Xojo or Real Studio, please prefix the connection string with the right prefix. e.g. "DB2:" for DB2. With SQLConnectionMBS or our Filemaker plugin, please set the right client. Claris FileMaker Plugin
25 06 13 - 11:27