Showing posts with label firebird 2.1. Show all posts
Showing posts with label firebird 2.1. Show all posts

Monday, January 19, 2009

Installing qt4.5 with Firebird support
and running the db demo (tested on ubuntu jaunty but it should work on intrepid too)

I assume firebird2.1 installed also the devel related packages


I use the snapshot usually (I use the webkit for arora) but you can download an more stable package from qtsoftware

http://www.qtsoftware.com/developer/preview-qt-4.5

git clone --depth 1 git://labs.trolltech.com/qt-snapshot


export PATH="/usr/local/Trolltech/Qt-4.5.0/bin:$PATH"
cd qt-snapshot
git pull
ln -s /usr/lib/libfbclient.so.2.1.1 /usr/lib/libgds.so
./configure -no-accessibility -no-exceptions -no-qt3support -nomake examples -nomake demos -plugin-sql-ibase -v
make && sudo make install


i use qt-creator to open an demo for sql

http://mapopa.blogspot.com/2009/01/qt-creator-is-now-open-source-here-is.html


open the sqlbrowser.pro from

qt-snapshot/demos/sqlbrowser

Compile it and press run

driver QIBASE
then fill the db name with
/var/lib/firebird/2.1/data/employee.fdb
username:SYSDBA
password:********

I was inspired by this thread from ubuntu forums

http://ubuntuforums.org/showthread.php?p=6577210#post6577210

And here is the screenshot

Monday, December 22, 2008

Hello world from firebird php on windows

download windows setup for firebird
in my case i test 2.0.5 rc2
http://www.firebirdsql.org/download/prerelease/win32/Firebird-2.0.5.13206_0_win32_RC2.exe
Download flamerobin
in my case 0.9.1.x
ttp://ovh.dl.sourceforge.net/sourceforge/flamerobin/flamerobin-snapshot-0.9.1.1822-setup.exe
download php zip or setup version from php.net
http://ar.php.net/distributions/php-5.2.8-Win32.zip
in my case i have unziped on d:\php5.2.x
rename the default ini to php.ini
uncomment the line with interbase.dll

extension=php_interbase.dll
run cmd.exe
Start->Run
cmd.exe
d:
cd php5.2.x
run
or php -m to see if interbase module is enabled

next create an test script
like this one

and run it like
php test.php from command line
next you need to install apache or nginx and enable them on windows
read the install.txt from php dir

http://gist.github.com/39050

Tuesday, October 21, 2008

I saw Delphi Developers Guide by Steve Teixeira and , Xavier Pacheco in an Book shop

and it is translated to Romanian language
I had tears in my eyes because I remember the days when I learned the Delphi/OOPascal/Interbase(Firebird) and all the examples are still fresh in my memory

This book I took it everywhere at school/at work /at home

Of course there are many other good books but today for me the free pascal docs are enough and the source

ps: also from the firebird conference I got the Marcu Cantu's book : Essential Pascal with his signature on it :)

Saturday, October 11, 2008

Testing Firebird 2.1 on Debian experimental

Testing Firebird 2.1 on Debian experimental

Update: There is now Firebird 2.5 final in experimental
also if you want 2.1 is already in testing and unstable (no need for experimental repository)

Here is my sources.list
cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian/ unstable main
deb-src http://ftp.us.debian.org/debian/ unstable main

Add:

deb http://ftp.us.debian.org/debian/ experimental main
deb-src http://ftp.us.debian.org/debian/ experimental main

Then:
# apt-get update -t experimental
# apt-get install -t experimental firebird2.1-classic
or install super-server
# apt-get install -t experimental firebird2.1-classic
Install examples and flamerobin
apt-get install -t experimental firebird2.1-examples flamerobin

follow the examples extaction procedure from this page [Scrooll down and ignore the apt sources.list lines]
https://help.ubuntu.com/community/Firebird2.1


With firebird2.1-classic i have this error when i try to connect to employee.fdb

Engine Code : 335544653
Engine Message :
cannot attach to password database


This is a caveat with classic server and not a bug in Flamerobin.

This is the recipe to reproduce it:
* install Debian classic-server package
* (before anything else) connect to any database using a direct path
to the database, not server:/path/to/db using any program linked
with libfbembed, for example the firebird-supplied tools (sql,
gfix etc)
- this starts the lock manager as the currently running user
(let's name it 'X', which most probably is *not* 'firebird')
* try to connect to any database either using the server:/path/to/db
connection string, or using an utility that is linked with
libfbclient (which preepends localhost: on raw connection
strings), for example flamerobin
- you can't as that utility would connect via the fb_inet_server,
which runs as user 'firebird' by default and cannot open the
lock files created by the user 'X'.

To avoid this

* always use localhost: in front of any paths. this way the lock
files and the shared memory segment will be owned by the
'firebird' user.


Friday, October 10, 2008

Installing and libdbi layer for c api and libdbi-driver for firebird

I wish firebird was more simpler to use similar to dbi api for example that i use in perl world

You can see more about libdbi C api in the bacula manual


The according to libdbi (http://libdbi.sourceforge.net/) project:
libdbi implements a database-independent abstraction layer in C,
similar to the DBI/DBD layer in Perl. Writing one generic set of code,
programmers can leverage the power of multiple databases and multiple
simultaneous database connections by using this framework.

Here is how the Firebird libdbi driver is implemented and you can see how the layer is made over the standard
firebird api

sudo apt-get install libostyle-dev libfbembed2.1 firebird2.1-dev

wget http://heanet.dl.sourceforge.net/sourceforge/libdbi/libdbi-0.8.3.tar.gz
tar -zxvf libdbi-0.8.3.tar.gz
cd libdbi-0.8.3/
./configure --prefix=/usr
make
sudo make install
cd ..


wget http://heanet.dl.sourceforge.net/sourceforge/libdbi-drivers/libdbi-drivers-0.8.3-1.tar.gz
tar -zxvf libdbi-drivers-0.8.3-1.tar.gz
cd libdbi-drivers-0.8.3-1/
./configure --with-firebird --with-firebird-dir=/usr --prefix=/usr --disable-docs


make
sudo make install
make check
libdbi-drivers test program: $Id: test_dbi.c,v 1.46 2008/02/06 16:22:44 mhoenicka Exp $
Library version: libdbi v0.8.3

libdbi driver directory? [/usr/lib/dbd]
1 drivers available: firebird
test which driver? firebird

database administrator name? SYSDBA

database administrator password? masterkey
database directory? [.] /var/lib/firebird/2.1/data

database hostname? [(blank for local socket if possible)]
database name? [libdbitest]

Driver information:
-------------------
Name: firebird
Filename: /usr/lib/dbd/libdbdfirebird.so
Desc: Firebird/Interbase database support
Maintainer: Christian M. Stamgren
URL: http://libdbi-drivers.sourceforge.net
Version: dbd_firebird v0.8.3-1
Compiled: Oct 10 2008
Use CONNECT or CREATE DATABASE to specify a database
CREATE DATABASE '/var/lib/firebird/2.1/data/libdbitest';

...