3
我有类似下面的代码,这个存储过程'get2Rows'返回2行,我想获取第1行并获取列值,然后获取第2行并获取列值。我如何迭代?遍历结果集.Net
using (System.Data.Common.DbCommand dbCommand = DataAccess.Instance().Database.GetStoredProcCommand("get2Rows"))
{
using (IDataReader reader = DataAccess.Instance().Database.ExecuteReader(dbCommand))
{
while (reader.Read())//here i want to get the 1st row
{
//here i want to get the columns of the 1st row....
}
};
}