要日期在maskedit1.text与maskedit2.text之前的数据(数据库中日期格式为2012-01-01)
SQL语句如下:‘select * from a
where a.rq>=#'+maskedit1.text+'# and a.rq<=#'+maskedit1.text+'# ’不用maskedit1.text直接用日期时编译通过,且结果正确,但用maskedit1.text后运行出错。提示语法错误。
直接用日期:‘select * from a
where a.rq>=#2011-01-01# and a.rq<=#2011-12-31# ’
SQL语句如下:‘select * from a
where a.rq>=#'+maskedit1.text+'# and a.rq<=#'+maskedit1.text+'# ’不用maskedit1.text直接用日期时编译通过,且结果正确,但用maskedit1.text后运行出错。提示语法错误。
直接用日期:‘select * from a
where a.rq>=#2011-01-01# and a.rq<=#2011-12-31# ’
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货