Access数据库的一个表中有一个日期类型的子段,但我不管如何设置它的类型,都不能正确查询出结果,但没发生查询错误,奇怪。
strSql = "select * from table1 where mydate < 2003-8-1";
this.oleDbSelectCommand1.CommandText = strSql;
da.Fill(ds, "table1");
Access中用##来分割日期:
strSql = "select * from table1 where mydate < #2003-8-1#";