I'm having problems with a statement handle running Perl 5.6 with Sybase. In
short the loop below works first time through then falls over second time
round with the following messages
ct_param() failed! at profile_handler line 952.
ct_param() failed! at profile_handler line 953.
ct_param() failed! at profile_handler line 954.
Mon Jul 1 13:02:54 2002: $product = IRSW
Mon Jul 1 13:02:54 2002: $system_code = 1079
Mon Jul 1 13:02:54 2002: $branch_id = 17608107
Mon Jul 1 13:02:54 2002: Could not execute statement handle
OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (16)
Message String: ct_send(): user api layer: external error: This routine
cannot be called while results are pending for a command that has been sent
to the server.
The code works without problem when the select produces no result set. He
seems to think there is more data to be retrieved even when if fetch'd the
only record. Can anyone help?
Here's a stripped down version of my code..
my $sth = $dbh->prepare("
select active_flag
from trade
where product = ?
and system_code = ?
and branch_id = ?")
or write_log($child_log,"Could not create statement
handle\n"
. $DBI::errstr) && die;
for my $pid (keys %pids) {
my ($product, $system_code, $branch_id) = @{$trades{$pid}};
$sth->bind_param(1,$product);
$sth->bind_param(2,$system_code);
$sth->bind_param(3,$branch_id);
$sth->execute()
or write_log($child_log,"Could not execute statement
handle\n"
. $DBI::errstr) && die;
my $active_flag = $sth->fetchrow_arrayref() || "";
}
Thanks in advance,
Jonathan
********************************************************************
Visit our Internet site at http://www.rbsmarkets.com
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
********************************************************************