PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Sabherwal, Balvinder (MBS)" <Balvinder dot Sabherwal at mortgagefamily dot com>
Subject: CT_Execute Question
Date: Apr 22 2002 1:55PM

Is it possible to do something like as below?? I don't get any outputs from
the code below. Am I doing something wrong??

my $cmde = "select * from sysdatabases";
my ($dr,@data,$ret); 
$dbh->ct_execute($cmde);
my @cols=$dbh->ct_col_names();
$dbh->ct_results($ret);

foreach my $kv (@cols) {
 print "$kv\n";
}

while($dbh->ct_results($ret) == CS_SUCCEED) {
    next unless $dbh->ct_fetchable($ret);
    while($dr = $dbh->ct_fetch) {
	#   push(@data,$dr) unless($dr eq "0" && $dr == 0);
	    print "$dr\n";
    }
}