The first case can be checked using HasRows flag
If the data is not read it can be done as follows:
SqlDataReader rdr = Cmd.ExecuteReader();
            while (rdr.Read() == true)
            {
              string sName =  rdr.GetString(1);
            }
       
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Posts
Posts
 
 

No comments:
Post a Comment