Firebird ODBC/JDBC Driver

Firebird ODBC connection

Hello all.
I'm trying to create ODBC DSN to connect to remote Firebird server.
I have installed unixODBC and fbclient from ports.

Here is my odbc.ini
Code:
[etalon]
Description = etalon
Driver = Firebird
Dbname = 192.168.1.2:D:\FirebirdBases\Etalon\newdatasd.ssd
User = login
Password = pass
Role =
CharacterSet = WIN1251
ReadOnly = No

and odbcinst.ini

Code:
[Firebird]
Description = InterBase/Firebird ODBC Driver
Driver = /usr/local/lib/libfbclient.so.1
Threading = 1
FileUsage = 1
CPTimeout =

But isql -v etalon tells me

Code:
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect

Could anyone explain me why it doesn't work?
 
1 did you tried to connect to that host with flamerobin or with firebird sql client ?
2. maybe is a an ldpath issue with the firebird lib
 
Hi,
I'm trying to install Firebird ODBC/JDBC Drivers from source

I found this HowTo for linux
http://www.firebirdnews.org/?p=1324

So what i do:
Code:
cvs -d:pserver:anonymous@firebird.cvs.sourceforge.net:/cvsroot/firebird login
cvs -z3 -d:pserver:anonymous@firebird.cvs.sourceforge.net:/cvsroot/firebird co OdbcJdbc

cd OdbcJdbc/Builds/Gcc.freeBSD
gmake -f makefile.freeBSD

And this is what i get:
Code:
error FBINCDIR is undefind

i'v made a few changes in makefile.environ
I replace /opt/firebird/include and /opt/firebird/lib with /usr/local/include and /usr/local/lib


and now i have following errors:
Code:
user# gmake -f makefile.freeBSD
../makefile.environ:12: ARCH is amd64
../makefile.environ:27: ODBCMANAGER is unixODBC in /usr/lib
../makefile.environ:45: FBINCDIR is /usr/local/include
../makefile.environ:51: FBLIBDIR is /usr/local/lib
g++ -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL -pthread -DNDEBUG -c ../../IscDbc/Attachment.cpp -o Release/obj/Attachment.o
g++ -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL -pthread -DNDEBUG -c ../../IscDbc/BinaryBlob.cpp -o Release/obj/BinaryBlob.o
g++ -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL -pthread -DNDEBUG -c ../../IscDbc/DateTime.cpp -o Release/obj/DateTime.o
g++ -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL -pthread -DNDEBUG -c ../../IscDbc/EnvShare.cpp -o Release/obj/EnvShare.o
g++ -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL -pthread -DNDEBUG -c ../../IscDbc/extodbc.cpp -o Release/obj/extodbc.o
g++ -g -w -D_REENTRANT -D_PTHREADS -DEXTERNAL -pthread -DNDEBUG -c ../../IscDbc/IscArray.cpp -o Release/obj/IscArray.o
In file included from ../../IscDbc/IscArray.cpp:31:
../../IscDbc/IscArray.h:46: error: stray '`' in program
../../IscDbc/IscArray.h:45: error: ISO C++ forbids declaration of 'OC' with no type
../../IscDbc/IscArray.h:45: error: expected ';' before 'int'
../../IscDbc/IscArray.cpp:137: error: no 'int IscDbcLibrary::CAttrArray::getBufferLength()' member function declared in class 'IscDbcLibrary::CAttrArray'
../../IscDbc/IscArray.cpp: In member function 'virtual void IscDbcLibrary::IscArray::attach(char*, bool, bool)':
../../IscDbc/IscArray.cpp:302: error: 'intptr_t' was not declared in this scope
../../IscDbc/IscArray.cpp:302: error: expected primary-expression before '*' token
../../IscDbc/IscArray.cpp:302: error: expected primary-expression before ')' token
../../IscDbc/IscArray.cpp:302: error: expected primary-expression before ')' token
../../IscDbc/IscArray.cpp:302: error: expected ',' or ';' before 'pointBlob'
gmake: *** [Release/obj/IscArray.o] Error 1
May somebody help with this problem?
Or maybe somebody could explain how to make an firebird odbc connection?
 
Back
Top