日期:2014-05-17  浏览次数:20876 次

日期查询问题
Microsoft   JET   Database   Engine   错误   '80040e14 '  
语法错误   (操作符丢失)   在查询表达式   'where   fa_data   between   #2007-4-1#   and   fa_data <=#2007-5-31# '   中。


starttime= "2007-4-1 "
endtime= "2007-5-31 "
set   rs=server.createobject( "adodb.recordset ")
rs.open "select   *   from   fa   where   where   fa_data   between   # "&starttime& "#   and   fa_data <=# "&endtime& "# ",db,1,3

------解决方案--------------------
rs.open "select * from fa where where fa_data between ' "&starttime& " ' and fa_data <= ' "&endtime& " ' ",db,1,3
你查询付值的时候不是直接是时间就不用#