Packages
efirebirdsql
0.2.0
0.9.15
0.9.14
0.9.13
0.9.12
0.9.11
0.9.10
0.9.9
0.9.8
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.10
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.0
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
Firebird Client
Current section
Files
Jump to
Current section
Files
efirebirdsql
README.rst
README.rst
=============
efirebirdsql
=============
Erlang Firebird client library.
Examples
-----------
Simple query and fetch all results::
{ok, C} = efirebirdsql:connect(
"server", "username", "password", "/path/to/database", []),
ok = efirebirdsql:execute(C, <<"select * from foo">>),
{ok, Results} = efirebirdsql:fetchall(C).
Fetch one by one::
ok = efirebirdsql:execute(C, <<"select * from foo">>),
{ok, R1} = efirebirdsql:fetchone(C),
{ok, R2} = efirebirdsql:fetchone(C),
{ok, R3} = efirebirdsql:fetchone(C).
Separate start_link() and connect()::
C = start_link(),
ok = efirebirdsql:connect(C,
"server", "username", "password", "/path/to/database", []),
Commit and rollback transaction::
{ok, C} = efirebirdsql:connect(
"server", "username", "password", "/path/to/database", [{auto_commit, false}]),
ok = efirebirdsql:execute(C, <<"update foo set column='A'">>),
ok = efirebirdsql:commit(),
ok = efirebirdsql:execute(C, <<"update foo set column='B'">>),
ok = efirebirdsql:rollback().
See also test/efirebirdsql_tests.erl
Server Configuretion with Firebird 3+
--------------------------------------
This driver connect with wire protocol version 10 (Interbase 6),
So if you use with Firebird 3+ server, you need to modify firebird.conf like below.
::
AuthServer = Srp, Legacy_Auth
WireCrypt = Enabled