Firebird Community (MBS SQL Plugin)

It will be nice that “Firebird lovers” keep all in contact in order to help each other with any problem that any of us could have with this nice and strong database working with XOJO.
May be this conversation could join us to do this.

Christian Schmitz from MBS could be a great help for all of us.
I had been using MBS SQL Plugin for a while. It works quite fine and the price is more than reasonable.

For many years I had been developing apps with VB6 + Firebird and during the las months I had been migrating all my apps to XOJO keeping Firebird as my database.

A repository of all necessary FireBird drivers (gds32.dll; fbclient.dll; libgds.dylib; libfbclient.dylib; libgds.so; libfbclient.so) in 32-bit and 64-bit formats for use with SQLDatabaseMBS would be an excellent start.

I would like answers to the following:
• has anyone extracted the FireBird drivers and successfully connected to (and queried) a FireBird database using SQLDatabaseMBS on Windows, Mac and Linux?
• a WebPage (or forum page) showing where to download, and how to install, FireBird (for Windows and Linux, 32/64 bit, no Mac version).
• some instructions on how to set it up and caveats to avoid.
• how does FireBird compare with other SQL databases and where you might choose it over, say, MySQL or PostgreSQL.
• is FireBird suitable for massive databases (BG or TB)?
• can FireBird handle hundreds of users (is FireBird multi-CPU aware)?
• what does FireBird cost?
• what are the licensing restrictions on FireBird, if any?

Please correct me if I am wrong with these below.

FireBird Server downloads (for access to the dll/dylib/so files):
http://www.firebirdsql.org/en/server-packages
http://www.firebirdsql.org/en/firebird-3-0

SQLDatabaseMBS FireBird examples:
Firebird Connect
Firebird Query
SQLDatabase Firebird Connect

Found a great FireBird FAQ site: http://www.firebirdfaq.org

Hi David… I try to answer your questions:

• has anyone extracted the FireBird drivers and successfully connected to (and queried) a FireBird database using SQLDatabaseMBS on Windows, Mac and Linux?
I do… quite simple with MBS SQL Plug in

• a WebPage (or forum page) showing where to download, and how to install, FireBird (for Windows and Linux, 32/64 bit, no Mac version).
Very easy an quickly to install. 20 seconds. Just dowload accept the terms and press continue

• some instructions on how to set it up and caveats to avoid.
start leaving the default options if you do not need nothing so special

• how does FireBird compare with other SQL databases and where you might choose it over, say, MySQL or PostgreSQL.
For me, same performance, easier to install and mantain. Great product.

• is FireBird suitable for massive databases (BG or TB)?
Yes. Pretty good

• can FireBird handle hundreds of users (is FireBird multi-CPU aware)?
Yes. No problem at all.

• what does FireBird cost?
Nothing

• what are the licensing restrictions on FireBird, if any?
None

Firebird Embedded might be useful for some: https://www.firebirdsql.org/pdfmanual/html/fbmetasecur-embedded.html

The plugin works so far fine with embedded and server mode.
FireBird and InterBase.

Is someone willing to share their drivers (gds32.dll; fbclient.dll; libgds.dylib; libfbclient.dylib; libgds.so; libfbclient.so)? This would save us all duplication.

the last time I tried, I just downloaded the firebird installer, run it through and copied the dlls from the installation.

There’s also a compressed file without an installer for each platform you can download. It will contain the firebird client.

Do they contain the drivers for Windows, Mac and Linux?

As far as I can remember, no. You will need to download the files for each OS.

I installed the Firebird server on Linux and downloaded the .zip file for Windows. I’ve not tried with Mac yet.

I’ve been looking but haven’t found an install for Firebird 3.x on OS X official or otherwise … anyone know of one, or manual install instructions?

Looks like it’s not available yet:

https://www.firebirdsql.org/en/news/firebird-3-0-is-released/

They now have a Mac ß version available. See http://www.firebirdsql.org/en/news/firebird-3-0-3-beta-builds-for-mac-os-x-64-bit-32-bit-and-lipo-are-available/ .

Does someone have a simple example (code snippet) how he connected to a Firebird-Database using the SQLDatabaseMBS-class?
How to specify where the client-library can be found? Connect string ? I am pretty new to Xojo right now, trying it on a web-project on both Windows and Linux… Thanks!

here is one:

[code] dim db as new SQLDatabaseMBS

// where is the library?
// you can place the database client library files where you want.
// example code just has some convenient location for testing.

if TargetWin32 then
db.Option(db.kOptionLibraryFirebird) = “gds32.dll;fbclient.dll”
elseif TargetLinux then
db.Option(db.kOptionLibraryFirebird) = “libgds.so:libfbclient.so”
elseif TargetMachO then
db.Option(db.kOptionLibraryFirebird) = “libgds.dylib:libfbclient.dylib”
else
MsgBox “Platform not supported.”
quit
end if

// or with file on disk
'db.SetFileOption SQLConnectionMBS.kOptionLibraryFirebird, SpecialFolder.UserHome.Child(“libfbclient.dylib”)

// connect to database
// in this example it is Firebird/InterBase,
// but can also be Sybase, Informix, DB2, MySQL
// SQLServer, SQLBase and ODBC

// Read more here: http://www.sqlapi.com/ServerSpecific/InterBase.html

// Please enter values for your server here:
dim ConnectionString as string = “xxx”

// For local databases, this can be a file name.
// To connect to a database on a remote server using TCP/IP the syntax is :.
// To connect to a database on a remote server using NetBEUI, the syntax is \\\.
// To connect to a database on a remote server using SPX, the syntax is @.

dim username as string = “xxx”
dim password as string = “xxx”

db.DatabaseName = “Firebird:” + ConnectionString
db.UserName = username
db.Password = password

if db.Connect then

MsgBox "We are connected!"

dim con as SQLConnectionMBS = db.Connection 
MsgBox "Server Version: "+con.ServerVersionString

// Disconnect is optional
// autodisconnect will ocur in destructor if needed

else
MsgBox db.ErrorMessage
end if[/code]

Yes, thank you very much! Just got my testproject running this way :

DIM mDb As New SQLDatabaseMBS

mDB.DatabaseName = “Firebird:/opt/databases/JaKoDB_DEUTF8.fdb”
mDB.UserName = “sysdba”
mDB.Password = “xxxxxxx”
mDB.Option(mDB.kOptionLibraryFirebird) = “libgds.so:libfbclient.so”

If Not mDB.Connect Then
MsgBox("Error: " + mDB.ErrorMessage)
else
MsgBox(“Connected…”)
// LoadRows

SortableListBox.DeleteAllRows
Dim IDPerson,TXVorname,TXNachname,TXStrasse,TXPlz,TXOrt As String
Dim sql As String
sql = “SELECT * FROM T_PERSONEN JOIN T_ADRESSEN ON T_PERSONEN.ID_PERSON = T_ADRESSEN.ID_PERSON”

Dim rs As RecordSet
rs = mDB.SQLSelect(sql)

…and so on… now it works fine on Linux ! Had big problems with ODBC Plugin before, even though unixODBC was
setup properly and the database-connect worked fine with ODBC. But when running the SQL I got a dynamic sql error…
Using the same SQL with the unixODBC-commandline-tool (isql) I could select the data without any problem…