I have a perl script that interfaces with an existing database (type of database is unknown) through the DBI module, that I would like to access in python 2.6 on winXP.
The perl code is:
use DBI;
my $DSN = "DBI:Proxy:hostname=some.dot.com;port=12345;dsn=DBI:XXXX:ZZZZZ";
my $dbh = DBI->connect($DSN);
Can this be translated into a python equivalent?
Following an example at (http://stackoverflow.com/questions/768250/is-there-any-pywin32-odbc-connector-documentation-available/768352#768352 ) I've put together the following:
import odbc
DSN = "DBI:Proxy:hostname=some.dot.com;port=12345;dsn=DBI:XXXX:ZZZZZ"
db = odbc.odbc(DSN)
But I get the error: dbi.operation-error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in LOGIN
UPDATE
It appears that another perl module, DBD::Proxy is providing the actual interface to a Perl DBI::ProxyServer (server-side) implementation that handles the actual queries.
Can python be used to interface with the Perl-based DBI::ProxyServer?
http://search.cpan.org/~timb/DBI-1.608/lib/DBD/Proxy.pm http://hell.org.ua/Docs/oreilly/weblinux/dbi/ch08_02.htm [Thanks araqnid]