请教PB中用游标进行日期时间查询的代码是什么?

来源:百度知道 编辑:UC知道 时间:2024/07/06 21:59:16

数据库是sql数据库的,我下面的代码怎么不能实现按日期查询呢
dw_1.settransobject(sqlca)
int result
date start_date
date end_date
start_date=date(em_1.text)
end_date=date(em_2.text)

dw_1.setfilter("birthday>='"+string(start_date)+"' and birthday<='"+string(end_date)+"'")

dw_1.retrieve()
result=dw_1.retrieve()
if result=0 then
messagebox("提示!","在此范围内,查不到相关符合记录!")
end if

如果不行你看看这个
http://www.bzsh.cn/software/p112/A11213833.shtml

还有这个

http://topic.csdn.net/t/20050929/11/4301548.html