是access数据库:
string text = "select top 5 a.topicid as topicid,min(t.title) as title,min(a.id) as attachid,min(a.attachpath) as attachpath from bbs_attach a,bbs_topic t where a.topicid=t.id and t.isdelete=0 and a.topicid>0 group by a.topicid order by attachid desc";
DataTable dt = base.conn.GetDataTable(text);
这种多表查询又group的用access数据库就出错,
但是我用同样表的sql server数据库就没问题
string text = "select top 5 a.topicid as topicid,min(t.title) as title,min(a.id) as attachid,min(a.attachpath) as attachpath from bbs_attach a,bbs_topic t where a.topicid=t.id and t.isdelete=0 and a.topicid>0 group by a.topicid order by attachid desc";
DataTable dt = base.conn.GetDataTable(text);
这种多表查询又group的用access数据库就出错,
但是我用同样表的sql server数据库就没问题
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货