isql_perl cursor
Posted in 1997
------------4A75FA668620 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii I am trying to do the following using isql_perl : $sql= "select * from table where colum= ? " ; $cid = &isql_open($sql, $parm) || die $isql_code; $sql2 = " select * from table2"; $cid2= &isql_open($sql2) || die $isql_code; $process=1; while ($process){ if ( &isql_fetchbyname(*cid2) ) { &isql_fetchbyname(*cid, $cid2{columnname} ); ... } else { $process =0; &isql_close($cid); &isql_close($cid2); } I tried to do the above with no luck. Am I doing something wrong? my other solution is to open and close cid2 in the loop.but this way it takes to long . Thanks! bsamani@onlinesystems.com Bahram ------------4A75FA668620 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii <HTML><BODY> <DT>I am trying to do the following using isql_perl :</DT> <DT> </DT> <DT>$sql= "select * from table where colum= ? " ;</DT> <DT>$cid = &isql_open($sql, $parm) || die $isql_code;</DT> <DT> </DT> <DT>$sql2 = " select * from table2";</DT> <DT>$cid2= &isql_open($sql2) || die $isql_code;</DT> <DT> </DT> <DT>$process=1;</DT> <DT>while ($process){</DT> <DT> if ( &isql_fetchbyname(*cid2) ) {</DT> <DT> &isql_fetchbyname(*cid, $cid2{columnname} );</DT> <DT> </DT> <DT> ...</DT> <DT> } else {</DT> <DT> $process =0;</DT> <DT> &isql_close($cid);</DT> <DT> &isql_close($cid2);</DT> <DT> }</DT> <DT> </DT> <DT>I tried to do the above with no luck. Am I doing something wrong?</DT> <DT> </DT> <DT>my other solution is to open and close cid2 in the loop.but this way it takes to long .</DT> <DT> </DT> <DT>Thanks!</DT> <DT>bsamani@onlinesystems.com</DT> <DT>Bahram</DT> </BODY> </HTML> ------------4A75FA668620--