C#.NET做的一个小程序,用的ACCESS数据库。(以前没用过ACCESS。。。)
string sql = "SELECT [CompanyName] as 公司名称,[Time] as 时间 FROM recordIN where [time] between #" + timeStart + "# and #" + timeEnd + "#";
库里存的Time是“日期/时间”型。传入的timeStart 和timeEnd 是"YYYY-MM-DD HH:NN:SS"格式的。
但是查不到数据。。。很郁闷,谁给解决一下
另外:
SELECT [CompanyName] as 公司名称,[Time] as 时间 FROM RecordIn where [time] between #2008-4-10 00:00:00# and #2008-4-10 23:59:59#
在ACCESS的视图查询环境下能查到数据。但是在程序中查不到数据。。
用的System.Data.OleDb。。。怎么回事?