Data read to Data table conversion. In many scenarios, we may require to convert data reader to data table. Connecting to data base is not a good way to achieve that. So we can do it by a trick as follows.
string ConStr= 'Call the connection string'
objCon= new SqlConnection(ConStr);
SqlCommand cmd = new SqlCommand('Some Query', objCon);
SqlDataReader objRead = cmd.ExecuteReader(CommandBehavior.CloseConnection);
DataTable objDt = new DataTable();
Here objDt.Load will load all the data contains from the reader to the data table objDt