Version 2 of Programming Oracle stored-procedure cursors

Updated 2001-10-29 15:41:26

Todd Helfter assumed responsibility for maintenance of Oratcl [L1 ] in 2000. He offers this example of use of a cursor returned from an Oracle stored procedure:

  set exec_cur [oraopen $lda]
  set fetch_cur [oraopen $lda]

  set plsql {begin
        open :fetchcur for select loginname, hostname
        from ac_account where loginname = :log;
        end;
  }ffff

  oraplexec $exec_cur $plsql :log tmh :fetchcur $fetch_cur
  orafetch $fetch_cur {puts "$login:$host"} "" login 1 host 2