Home > Archive > Sybase ODBC > December 2005 > Connecting to sybase with perl DBD::ODBC









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Connecting to sybase with perl DBD::ODBC
tborthwick@gmail.com

2005-12-21, 8:23 pm

Hello,

I'm having trouble installing DBD::Sybase on my pc so I'm trying to use
DBD::ODBC. I can connect when I add a dsn to the ODBC Data Source
Administrator, but I'm not sure what connection string to use with no
dsn. I'm trying-

my $CONNECT = "DRIVER={Sybase ASE ODBC Driver};ServerName=b
mw325,5000;"
. " UID=sa;PWD=XXX;DB=kf
j;";
my $dbh = DBI->connect("dbi:ODBC:$CONNECT", "", "");

but that doesn't work.

DBI connect('DRIVER={Sybase ASE ODBC
Driver};ServerName=b
mw325,5000;UID=sa;PW
D=XXX;DB=kfj;','',...) failed:
[Microsoft][ODBC Driver Manager] Data source nam
e not found and no default driver specified (SQL-IM002)(DBD:
db_login/SQLConnect
err=-1) at C:\scripts\perl\test
ODBC.pl line 14
Can't call method "prepare" on unblessed reference at
C:\scripts\perl\test
ODBC.p
l line 19.

Any ideas? I'm not sure what arguments need to go into the connection
string.

Thanks,

Tom

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com