PowerBuilder游标的使用

string ls_cop,ls_cops

declare cop_cursor cursor for
select cop_id from sys_cop where operations_center is not null and operations_center<>"" and operations_center=:ai_center using sqlca;

open cop_cursor;
 fetch cop_cursor into :ls_cop;
do while sqlca.sqlcode=0  
  ls_cops=ls_cops+","+ls_cop
      fetch cop_cursor into :ls_cop;
loop
close cop_cursor;
ls_cops=mid(ls_cops,2)
messagebox("ls_cops",ls_cops)

posted @ 2011-12-17 11:15  szjdw  阅读(305)  评论(0编辑  收藏  举报