Access数据库问题
我在SQL中用这样的SQL语句可以执行,可是换成Access却不行了,请问是怎么啦?
OleDbDataAdapter MyAdapter = new OleDbDataAdapter("Select Top "+PageSize+" * from articles where id not in(select top "+PageSize*CurrentPage+" id from articles where UserID="+Session["UserID"].ToString()+" and Cid="+Convert.ToInt32(DDL1.SelectedIndex.ToString())+" order by id desc) and UserID="+Session["UserID"].ToString()+" and Cid="+Convert.ToInt32(DDL1.SelectedIndex.ToString())+" order by id desc",MyCon());
提示错误:
语法错误。 在查询表达式 'id not in(select top 0 id from articles where UserID=1 and Cid=0 order by id desc) and UserID=1 and Cid=0' 中。