遗忘海岸

江湖程序员 -Feiph(LM战士)

导航

PB动态游标代码段

sql = "select p_partno  from p_partno_rm group by p_partno order by p_partno"
declare my3 dynamic cursor for sqlsa;
prepare sqlsa from :sql;
open dynamic my3;
fetch my3 into:partno;
do while sqlca.sqlcode = 0
	partno = trim(partno)
	if partno <> "" and not isnull(partno) then
		ddlb_partno.additem(partno)  
	end if 
	fetch my3 into:partno;
loop
close my3;
if sqlca.sqlcode = 0 then 
	commit using sqlca;
else
	rollback using sqlca;
end if 

 

posted on 2011-11-28 19:40  遗忘海岸  阅读(1494)  评论(0编辑  收藏  举报