« MBS Filemaker Plugin,… | Home | SSL Trouble »

Connecting to a Firebird database using Xojo, Real Studio or FileMaker

If you need to connect to Firebird, you can use our MBS SQL Plugin. First you need to set option on SQLConnectionMBS: The kOptionLibraryFirebird option must point to the name/path of the firebird library file, e.g. fbclient.dll. Next you connect to the database. Connection string for a local database is simply the file path like "C:\webfakt\daten\webfakt.fdb" in our sample. The username and passwords must be set, e.g. "SYSDBA" and "masterkey". Now call connect method and pass connection string, username, password and the client which is kFirebirdClient.

Now when you do queries, the plugin will ask firebird library to provide strings in unicode. For that the database must have a character set defined. But what happens if none is defined? In that case the try to convert the guessed character set to Unicode will destroy probably the umlauts in the text. The solution can be to cast the encoding like this: CAST(FIRMA as varchar(100) CHARACTER SET ISO8859_1)

So for each field we select, we redefine the datatype with a cast operation and fix the encoding. On the long run the database encoding should be defined to fix this and have the plugin automatically provide correct strings.

PS: Same works in FileMaker with our MBS FIleMaker Plugin and the SQL functions.
13 01 14 - 23:11
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.