Hi!
I've been working with Lazarus under Windows the last two years, and now I'm starting to work in linux (ubuntu 6.10) so, I want to re-compile all my proyects to this new O.S. My problem is that I don't know how to link via ODBC with databases (the proyect I want to migrate now is linked to M$ Access database). The first I did was to install unixODBC and mdbtools package (that comes with and Access ODBC called libmdbodbc.so.0). Then I wrote /etc/odbcinst.ini as I saw in a web with:
[Microsoft Access Driver (*.mdb)]
Description = MDB Tools ODBC drivers
Driver = /usr/lib/libmdbodbc.so.0
Setup =
FileUsage = 2
CPTimeout =
CPReuse =
and the /etc/odbc.ini with:
[Cofinanza]
Description = Base de datos de Cofinanza
Driver = Microsoft Access Driver (*.mdb)
Database = /home/jluix/Proyectos_Lazarus/Cofinanza/Cofinanza.mdb
Servername = localhost
Obviously, Cofinanza.mdb is the database I want to access.
In ODBCConfig I can see now the result of previous sentences but, when I try run my program with the next lines (that work fine in windows):
ODBC.Driver:='Microsoft Access Driver (*.mdb)';
ODBC.Params.Add('DBQ='+Param1);
ODBC.Params.Add('PWD='+Param2)
.....
ODBC.Connected:=True;
I got an error message:
Project raised exception class 'EInOutError' with message: Can not load ODBC client. Is it installed? (libodbc.so).
I've been browsing a lot for the solution but I'ven't got luck. Could you help me?. Many thanks.