B
bjaman
Unregistered / Unconfirmed
GUEST, unregistred user!
一条SQL语句:
select * from 销售记录 where 记录时间 >= #2006-09-28 00:00:00# and 记录时间 <= #2006-09-28 23:59:59#
在IDE的Explorer中执行正常。
但是把此语句交给TADOQuery来执行时报错:
---------------------------
Debugger Exception Notification
---------------------------
Project JiuQuQX.exe raised exception class EOleException with message '不正常地定义参数对象。提供了不一致或不完整的信息。'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
经过反复检查,如果把该语句的日期时间常量的时间部分去掉,就不会报错。但是得不到我要的结果。我的意思是要查出某一天00:00:00~23:59:59之间的数据,这个用法为什么Delphi执行时会出错?
select * from 销售记录 where 记录时间 >= #2006-09-28 00:00:00# and 记录时间 <= #2006-09-28 23:59:59#
在IDE的Explorer中执行正常。
但是把此语句交给TADOQuery来执行时报错:
---------------------------
Debugger Exception Notification
---------------------------
Project JiuQuQX.exe raised exception class EOleException with message '不正常地定义参数对象。提供了不一致或不完整的信息。'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
经过反复检查,如果把该语句的日期时间常量的时间部分去掉,就不会报错。但是得不到我要的结果。我的意思是要查出某一天00:00:00~23:59:59之间的数据,这个用法为什么Delphi执行时会出错?