if you already have data in your DataTable it just takes
4 steps to update into database
1)create a connection to database:
con = new SqlConnection(c onString);
// for conString see
http://www.csharp-station.com/Tutori.../Lesson02.aspx
2)Open connection :
con.Open();
3)Enter into DataBase with a loop like :
for(int i=0;i<dt.Rows.C ount;i++)
{
command = new SqlCommand("INS ERT INTO tables (value,val) VALUES('"+dt.Ro ws[i][0].ToString()+"', '"+dt.Rows[i][1].ToString()+"') ",con);
command.Execute NonQuery();
}
here i assume two columns so
dt.Rows[i][0].ToString() is the string from row i and column 0
dt.Rows[i][1].ToString() is the string from row i and column 1
u have to pass values to your own need
4)Close Connection :
con.Close();