I'm using Sybase::CTlib to query a Sybase server. However when I execute the following:
while( $dbr->ct_results($restype) == CS_SUCCEED ) {
if( $restype == CS_CMD_FAIL ) {
warn "Update Check Failed...";
next;
}
next unless $dbr->ct_fetchable($restype);
$ts = $dbr->ct_fetch;
}
My query returns exactly one value. Thats why I'm reading into one variable.
I'm getting errors:
Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (163)
Message String: ct_results(): user api layer: external error: This routine cannot be called until all fetchable results have been completely processed.Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (159)
Message String: ct_cmd_drop(): user api layer: external error: This routine can be called only if the command structure is idle.
What's going wrong?