[fpc-pascal] Re: Reading MDB (MS-Access) data under Linux

Bo Berglund bo.berglund at gmail.com
Mon Nov 1 13:34:00 CET 2010


On Mon, 1 Nov 2010 13:00:23 +0100 (CET), Michael Van Canneyt
<michael at freepascal.org> wrote:

>
>
>On Mon, 1 Nov 2010, Graeme Geldenhuys wrote:
>
>> Hi,
>>
>> I need to write a data conversion app. Has anybody read MDB data under
>> Linux yet, using SqlDB? I saw there was a ODBC database component, and
>> searched by Ubuntu repository. I installed 'iodbc', 'libiodbc2' and
>> 'libiodbc2-dev'.   The 'iodbc' package came with a GTK ODBC Admin app, but
>> I have no clue how ODBC works.
>
>
>This is not enough. You must install a ODBC driver for access database.
>The MDBTools contain one; install "libmdbodbc" (it will install other mdb tools).
>
>You must make a DSN in the ODBC configuration that defines your database.
>Install unixodbc-bin and run the (graphical) odbcconfig tool. 
>It's pretty straightforward from then on.
>
>>
>> * Anybody that can confirm that I can read MDB files via SqlDB's ODBC
>> component.
>
>On windows it can.
>
>>
>> * Any pointers and URL's on how to setup ODBC under Linux (Ubuntu)?
>
>There is little to set up:
>Set up the DSN, and point the TODBCConnection to the DSN you set up.
>Then run your query.
>
>But be careful, the mdb tools SQL abilities are rather limited.
>Don't expect to be able to run just about any SQL query.
>
>If you just need SELECT * FROM TABLE, then that should work fine.
>
Just tacking on the other MS database MSSQLServer:
Is it possible to also work with MS SQLServer databases via ODBC on
FPC from Linux? Obviously the SQLServer must be running on Windows so
this is about network access to the database engine.
When I make data sources in Windows for these databases I do not use
ODBC but a native SQLServer driver, is such available also on Linux?

Bo Berglund




More information about the fpc-pascal mailing list