“order”运算符后缺少操作数。dt.Select order by排序

转自:http://blog.csdn.net/colorseason/article/details/8662372

 

在使用DataTable.select进行排序时,直接写DataRow[] drr = dt.Select("POSTPARID='" + node.Value.ToString() + "' order by  DISPINDEX ASC");

这样写会报如题错误:“order”运算符后缺少操作数。

Select("过滤条件","排序列")

所以应该改成DataRow[] drr = dt.Select("POSTPARID='" + node.Value.ToString() + "'", " DISPINDEX ASC")即可

 

posted @ 2017-03-30 17:21  风中寻觅  阅读(541)  评论(0)    收藏  举报