Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please provide an example for retrieving the dataset values.
Posted
Updated 11-Nov-10 0:03am
v3
Comments
jim lahey 11-Nov-10 5:54am    
this is not clear.

1 solution

string Val="";
//Check dataset Tables Count like:
Dataset ds=new Dataset();
if(ds.Tables.Count > 0)
{
  // Check Rows Count in Each Table like
  if(ds.Tables[0].Rows.Count > 0)
  {
     //Retrieve value like
     Val=ds.Tables[0].Rows[0]["Field1"].Tostring();
  }
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900