|
有如下的select语句,其中...表示省略一些查询字段.
select AA.[ID],AA.[NO], ... AA.[Memo]
from [Table] as AA
where AA.[CreateDate]>='2016-12-05 00:00:00.000'
and AA.[CreateDate]<='2017-01-04 23:59:59.999'
order by AA.[NO] desc
该语句放在VC中用ADO Recordset竟然查询不出任何数据记录,而放到查询分析器中去却能查询出很多符合条件的记录来.
这是为何呀?
字段CreateDate是一个datetime型的,查询时我以字符串的方式去做为条件查询的. |
|