Hi,
I have 5 rows in a dataset. I want get and execute the data from dataset(ds) one by one. How can I do the same.
Ex:
SqlParameter[] arParameters = new SqlParameter[1];
arParameters[0] = new SqlParameter("@iBatchID", objBatchContent.BatchID);
ds = dh.ExecuteDataSet("[dbo].[uspGetInterimBatchID]", CommandType.StoredProcedure, arParameters);
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
int name=0;
for(int i=0;i<ds.Tables[0].Rows.Count; i++)
// Here I have morethan 5 rows in the ds, I want get the data one by one from the ds. {
name = Convert.ToInt32(ds.Tables[0].Rows[0]["I_Interim_batch_ID"]);
CenterManager.CopyInterimBatchContents(Convert.ToInt32(ddlBatch.SelectedValue), name.ToString(), sCreatedBy, dtCreatedOn);
}
}
}
Karthik