|
|
sybperl-l Archive
Up Prev Next
From: "Ioffe, Dimitry" <Dimitry dot Ioffe at gs dot com>
Subject: $dbh->ct_res_info(CS_ROW_COUNT) problems
Date: Jan 4 2002 5:15PM
Hello all,
Can someone pls. point me as to what am I missing. I'm running following
code:
....
$status=$dbh1->ct_execute("
select '\"'+
name+'\",\"'+type+'\",\"'+convert(varchar,crdate)+'\"' from
$dbName1..sysobjects
where type not in ('S', 'D')
");
while ($dbh1->ct_results($restype) == CS_SUCCEED) {
next if ($restype == CS_CMD_DONE || $restype == CS_CMD_FAIL
|| $restype == CS_CMD_SUCCEED);
if ($c = $dbh1->ct_res_info(CS_ROW_COUNT)) {
print "$c";
}
while (@dat=$dbh1->ct_fetch) {
....
and the err. msg. I'm getting is:
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (42)
Message String: ct_res_info(ROWCOUNT): user api layer: external error: This
routine cannot be called after ct_results() returns a result type of
CS_ROW_RESULT.
Thanks,
Dimitry.
|