I am a happy user of DBD::Sybase to enable my perl to talk with MS SQL Server.
The DBD::Sybase I am using is .tar.gz, I need distribution in .rpm as the deployment machine don't have make :)
What I have done is the following:-
(1)
/usr/lib/rpm/cpanflute2 DBD-Sybase-0.94.tar.gz // convert .tar.gz to .src.rpm
(2)
vi perl-DBD-Sybase.spec // change the following line, so SYBASE environment variable is set
CFLAGS="$RPM_OPT_FLAGS" SYBASE=/usr perl Makefile.PL
(3)
rpm -bb perl-DBD-Sybase.spec //build the .rpm from .spec file, DONE
(4)
rpm -ivh perl-DBD-Sybase-0.94-8.i386.rpm // Done, 100% complete
(5)
// try a connetion test script (see below...) from freetds.org
perl sybasetest.pl segmentation fault
Please advice and where should I start looking for any mistake I made?
Thank you, Calvin
========================================== ## sybasetest.pl
#!/usr/bin/perl -w
use DBI;
my $dbh = DBI->connect("dbi:Sybase:server=192.168.250.71", 'lbs', 'lbs', {PrintError => 0});
die "Unable for connect to server $DBI::errstr"
unless $dbh;
my $rc;
my $sth;
#$sth = $dbh->prepare("select [EMAIL PROTECTED]@servername");
$sth = $dbh->prepare("select * from AP_INFO");
if($sth->execute) {
while(@dat = $sth->fetchrow) {
print "@dat\n";
}
}
=================================================
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
