private void LoadDataToTable()
{
DataTable Tb1= null;
using (SqlConnection connection =new SqlConnection("con"))
{
using (SqlCommand cmd=connection.CreateCommand())
{
cmd.CommandText = "select * from Student";
cmd.CommandType = System.Data.CommandType.Text;
using (SqlDataReader read=cmd.ExecuteReader())
{
if (reader.HasRows)
{
Tb1= new DataTable();
Tb1.FIll(read);
}
}
}
}
}
Life is a Race
Thanks & Regards
By
Sabari Mahesh P M