Access数据库datetime查询问题

与MSSQL存在差异,需要在日期前加#,比如:#2008-12-19#就OK了

 string startTime = this.dtpAbStartTime.Value.ToString();
 string endTime = this.dtpAbEndTime.Value.ToString();
 string strWhere = "datetime between #" + startTime + "# and #" + endTime + "#" + " and Priority ='"+this.cbxAbType.Text+"'";
          

原文地址:https://www.cnblogs.com/dream844/p/2638422.html