|
|
sybperl-l Archive
Up Prev Next
From: Beth Breidenbach <Beth dot Breidenbach at BankAmerica dot com>
Subject: problems with ct_execute
Date: Oct 8 1998 6:07PM
I'm unable to retrieve results from ct_executein my cgi, but _am_
able to successfully use ct_sql to get the same results. Both
versions (ct_execute and ct_sql) work when called from the command
line.
The code is listed below. We're using perl 5.004, Apache 1.3.?,
mod_perl 1.15, on Solaris 2.6, with Sybase 11.5.
Anyone have a suggestion as to what I'm missing???????
---------- code below ---------------------------
use CGI::Switch;
use Sybase::CTlib;
...print some html stuff....
$db=Sybase::CTlib->ct_connect('userid','passwd','server');
$db->ct_execute("select uid, name from sysuers");
while ( $db->ct_results($result) == CS_SUCCEED) {
next unless $db->ct_fetchable($result);
while ( ($uid, $name) = $db->ct_fetch ) {
print "$uid - $name\n";
}
}
...print more html stuff...
If I substitute $db->ct_sql(select statement) for the ct_execute
statement and set @rows equal to the result, it works fine. And,
the above works correctly if run command-line at the terminal.
Help?????????
Beth Breidenbach
|