注册 登录
编程论坛 PowerBuilder

各们老师帮帮忙! 又是报 types of expressions must match!

nklph 发布于 2008-06-17 10:41, 2576 次点击
string   m,d,m1,d1,rqsql,qsrq,jsrq


m=string(ole_1.object.month)   
d=string(ole_1.object.day)   
if   ole_1.object.month<10   then   m="0"+string(ole_1.object.month)   
if   ole_1.object.day<10   then   d="0"+string(ole_1.object.day)
m1=string(ole_2.object.month)   
d1=string(ole_2.object.day)
if   ole_2.object.month<10   then   m1="0"+string(ole_2.object.month)   
if   ole_2.object.day<10   then   d1="0"+string(ole_2.object.day)
qsrq=string(ole_1.object.year)+"-"+m+"-"+d
jsrq=string(ole_2.object.year)+"-"+m1+"-"+d1

rqsql="增仓日期>="+qsrq+" and 增仓日期<="+jsrq

dw_1.reset()
dw_1.settransobject(sqlca)
dw_1.setfilter(rqsql)
dw_1.filter()
dw_1.retrieve()
ole_1.setfocus()
1 回复
#2
ap_jiang2008-07-05 13:19
回复 1# nklph 的帖子
rqsql="增仓日期>="+qsrq+" and 增仓日期<="+jsrq
改为
rqsql="增仓日期>='"+qsrq+"' and 增仓日期<='"+jsrq+"'"
试试,应该好了
1