I want to access SYBASE database using Perl. My client OS is Windows NT Server 4.0
with Sybase installed(e:\sybase,version 11.0.2.1 for NT,almost all compnents
installed),and Perl is ActivePerl-5.6.0.623, also I installed DBI(1.14) and
DBD::Sybase(0.91) using PPM with no further installing steps.Sybase server is on
another computer named 'Sybase' whose OS also is Windows NT Server 4.0. I created a
test script as the follows:1 use strict;2 use DBI;3 BEGIN{4
$ENV{SYBASE}='e:\sybase';5 $ENV{DSQUERY}='196.100.3.100'; # IP address of Sybase
Server6 }7 my ($username,$password)=("jhmaster","jh_master"); # username &
password of database8 my
$dbh=DBI->connect("dbi:Sybase:database=sybase",$username,$password,9
{raiseerror=>1,autocommit=>0}) || die "error";10 my
@driver_names=DBI->available_drivers;11 print "@driver_names\n";12 my
@data_sources=DBI->data_sources('sybase');13 print "@data_sources"; when I run
it, I got error info as follows: E:\perl>install_driver(Sybase) failed:DBD::Sybase
initialize: cs_ctx_alloc()failed at E:/perl/lib/DynaLoader.pm line 219. Compilation
failed in require at (eval 1) line 8. when I commented line7 & 8,line10 & 11 runs
OK,the result includes 'sybase',but line 13 got the same error info above. It seems
that DBI or DBD::Sybase or Sybase is not installed and configured properly. Please
tell me what's the problem and proper steps about configuring my various
parameters(include DBI,DBD::Sybase,Sybase on client/server). And where can I find
documents about install/configuration steps of accessing Sybase using Perl. I am
longing for your response. Thank you very much!!
---------------------------------
Do You Yahoo!?
Find a job, post your resume on Yahoo! Careers.