DataRow循环取出

string strName = null;
DataRow dRow = DB.GetDataRow(Sql语句);
if (null != dRow)
{
foreach (DataRow item in dRow.Table.Rows)
{
strName += item["SType_Name"].ToString() + ",";//取出某一列的所有数据,并进行逗号分隔
}
}

posted @ 2016-06-15 16:02  咧嘴玩手机的猫  阅读(878)  评论(0编辑  收藏  举报