mahdi bg
07-01-2009, 07:27
سلام
من اگر توی یک DataTable تغییرات رو انجام بدم و بخوام توی پایگاه داده منتقل بشه باید چکار کنم؟
من کار های زیر رو انجام دادم :
OleDbConnection
connection;
OleDbDataAdapter dataadaptor;
DataTable datatable;
connection.ConnectionString =
""
dataadaptor.SelectCommand = newOleDbCommand(""");
dataadaptor.SelectCommand.Connection = connection;
connection.Open();
dataadaptor.Fill(datatable);
connection.Close();
DataRownewrow = datatable.NewRow();
newrow[1] = "10";
newrow[2] = "10";
newrow[3] = 10;
datatable.Rows.Add(newrow);
حالا باید چکار کنم تا این تغییر به پایگاه داده منتقل بشه.
ممنون
من اگر توی یک DataTable تغییرات رو انجام بدم و بخوام توی پایگاه داده منتقل بشه باید چکار کنم؟
من کار های زیر رو انجام دادم :
OleDbConnection
connection;
OleDbDataAdapter dataadaptor;
DataTable datatable;
connection.ConnectionString =
""
dataadaptor.SelectCommand = newOleDbCommand(""");
dataadaptor.SelectCommand.Connection = connection;
connection.Open();
dataadaptor.Fill(datatable);
connection.Close();
DataRownewrow = datatable.NewRow();
newrow[1] = "10";
newrow[2] = "10";
newrow[3] = 10;
datatable.Rows.Add(newrow);
حالا باید چکار کنم تا این تغییر به پایگاه داده منتقل بشه.
ممنون