Pages

Monday, 20 January 2014

How to read more than one table from database using DataReader

                        if (dr.HasRows)
                        {                          
                            while (dr.Read())
                            {                            
                            }
                        }
                        if (dr.NextResult())
                        {                          
                            if (dr.HasRows)
                            {                            
                                while (dr.Read())
                                {                                  
                                }                            
                            }
                        }
                        dr.Close();

No comments:

Post a Comment