Link to home
Start Free TrialLog in
Avatar of hexfusion
hexfusion

asked on

Howto dbi:odbc connect linux->ms access

I am trying to setup an odbc connection from a box running centos 5.4 to a windows 2003 server.  I am having a hard time completely understanding how this takes place.

Currently I have current versions of  DBI and DBD:ODBC as well as unixODBC installed.  My thoughts were that ODBC on the win box would allow connections from linux but I can't seem to get this to work.  Any help would be grateful.
Avatar of FishMonger
FishMonger
Flag of United States of America image

Can you show us your code and the errors/warnings that you're receiving?
Avatar of hexfusion
hexfusion

ASKER

I want to verify this is even possible it seems I would need to use DBD::Proxy to pull this off.  I honestly don't have any code I am using at the moment I just want to get a solid possible yes/no and example.
Since I don't know anything about your network setup, I can't say if you need to use DBD::Proxy.

If your database on the Windows server is setup correctly to allow remote connections, then DBD::ODBC will handle things.  Your starting point should be to create a short script that use DBI and DBD::ODBC and does nothing more than establishes the DB connection.  Once you have that working, then you can move on to the queries.
If you need example, then start with the ones that are in the documentation for the modules.

DBI:
http://search.cpan.org/~timb/DBI-1.609/DBI.pm

DBD::ODBC
http://search.cpan.org/~mjevans/DBD-ODBC-1.23/ODBC.pm
ASKER CERTIFIED SOLUTION
Avatar of clockwatcher
clockwatcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So a short yes/no... Yes. It's possible to just use DBD::ODBC, but to do it you'll need to install/purchase the actual ODBC driver (easysoft) and your unix box will  need to have access to the actual database file (typically a samba mount).