日期:2014-05-18  浏览次数:20494 次

order by语句错误
ads.SelectCommand = "SELECT * FROM [defaultpage] WHERE ca_id =" + Request.QueryString["ca_id"] + " ORDER BY [album_date] DESC";
这是sql2005语句的order by语句,但是会显示关键字“order”附近有语法错误。请问各位大神这是怎么回事,我看是没有问题,求大神指点!分不多,全给了!

------解决方案--------------------
没注意看 以为是纯 sql语句
------解决方案--------------------
试试这样
ads.SelectCommand = "SELECT * FROM [defaultpage] WHERE ca_id ='" + Request.QueryString["ca_id"] + "' ORDER BY [album_date] DESC";