那么在窗口的open事件中
//往下拉列表框中添加数据
dw_1.settransobject(sqlca)
if dw_1.retrieve()<0 then
messagebox('注意:','提取数据有误!')
return
end if
int t1
for t1=1 to dw_1.rowcount()
ddlb_1.additem(dw_1.getitemstring(t1,'name'))
next
在ddlb_1的selectionchanged事件中
//注意:事件传递过来一个参数index
long ll_id
ll_id = dw_1.getitemnumber(index,'id')
这样就能够得到用户选择的item的对应的id
不知道这样是否能让你满意