#!/usr/bin/perl
use Sybase::CTlib;
my $DB_SERVER_NAME = "******";
my $DB_USER_NAME = "******";
my $DB_USER_PSWD = "******";
my $DB_NAME = "******";
my $DB_TABLE_NAME = "******";
$dbh = new Sybase::CTlib $DB_USER_NAME, $DB_USER_PSWD, $DB_SERVER_NAME;
$dbh->ct_sql("use $DB_NAME");
$dbh->ct_execute("set rowcount 2\select * from $DB_TABLE_NAME");
while($dbh->ct_results($restype) == CS_SUCCEED)
{
next unless $dbh->ct_fetchable($restype);
while(@data = $dbh->ct_fetch)
{
print "@data\n";
}
}
1 comment :
It helped me today
Thanks
Post a Comment