示例一

string ls_sub_storage

declare cur_sub_storage cursor for
select sub_storage from drug_sub_storage_dict WHERE sub_storage like '%药房%';
open cur_sub_storage;
fetch cur_sub_storage into :ls_sub_storage;
do while sqlca.sqlcode=0
ddlb_1.AddItem (ls_sub_storage)
fetch cur_sub_storage into :ls_sub_storage;
loop
close cur_sub_storage;


//示例二


string temp
declare mycur cursor for//定义游标mycur
select dept_name
from dept_dict;
open mycur;
do while true
fetch mycur into :temp;
if sqlca.sqlcode<>0 then exit
ddplb_1.additem(temp)
loop
close mycur;

posted on 2021-11-01 20:43  江湖小虾米L  阅读(233)  评论(0编辑  收藏  举报