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

2010-11-01 Thread Bo Berglund
On Mon, 1 Nov 2010 13:00:23 +0100 (CET), Michael Van Canneyt
mich...@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

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2010-11-01 Thread Andreas Schneider

On Mon, 01 Nov 2010 13:34:00 +0100, Bo Berglund bo.bergl...@gmail.com
wrote:
 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

I only know of a unixodbc driver called FreeTDS. I successfully
connected to a MSSQL Server 2008 from my FPC application on Linux, using
unixodbc, freetds and sqldb :)

Best Regards,
Andreas Schneider.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2010-11-01 Thread Graeme Geldenhuys
Op 2010-11-01 14:34, Bo Berglund het geskryf:

 Just tacking on the other MS database MSSQLServer:
 Is it possible to also work with MS SQLServer databases via ODBC on

I would imagine the only obstacle in that would be to find a ODBC MS-SQL
Server driver for Linux.  EasySoft has one listed, but I don't know if it's
for Linux and if it's commercial/free.

  http://www.easysoft.com

As for accessing the MDB file via ODBC under Linux. No matter what I tried,
I couldn't connect to it. I installed all the mentioned apps and packages,
but no luck. I did find a MDB File Viewer app though, so I opened my MDB
file, and simply exported the tables I need to CSV files. My app will
process them from there...



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net:8080/fpgui/

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


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

2010-11-01 Thread Artur Stuczynski



I only know of a unixodbc driver called FreeTDS. I successfully
connected to a MSSQL Server 2008 from my FPC application on Linux, using
unixodbc, freetds and sqldb :)


I can confirm this setup (FreeTDS+unixodbc) only I accessed SQL Server 
from Linux via Zeos instead of sqldb.


Artur
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal