对于大数量的检索,偶使用:RetrieveStart、RetrieveRow、RetrieveEnd这三个事件
一、在窗体上有一提示用的状态显示:st_ts
二、设置一实例变量:blog ib_stop //用来指示是否停止检索数据
三、在检索数据按钮里写:
if this.text = "开始检索" then
this.text="停止检索"
ib_stop = true //true表示可以开始检索
dw_1.retrieve()
else
this.text = "开始检索"
ib_stop = false //false表示停止检索
end if
//在dw的RetrieveRow里:
st_ts.text="已检索到记录数:"+string(dw_1.rowcount())
yeild()
if ib_stop = false then -1 //用户停止检索 |