string
addybhdeclare
petor cursor for //设置游标名petor
select "
cpy"."
ybh" //cpy是表名.ybh要列名
from "
cpy"
order by "
cpy"."
ybh" desc; //排列顺序
ddlb_ybh.reset() //ddlb_ybh为LISEBOX名
open
petor; //打开游标
fetch
petor into :
addybh;
do while sqlca.sqlcode=0 //填入数据,若查询成功则继续
ddlb_ybh.insertitem(
addybh,1)
ddlb_ybh.text=
addybh
fetch
petor into :
addybh;
loop
close
petor; //关闭油标号游标
//以上黑体字是我自定义的,我也是初学,和你一样要用下拉列表,找了半天终于弄出来了,希望对你有帮助
[此贴子已经被作者于2006-3-19 15:04:21编辑过]