3
이 저장 프로 시저 'get2Rows'는 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....
}
};
}