как я могу сделать несколько обновлений, используя datatable?
Я нашел это Обновление 1 строки
мой код:
public void ExportCSV(string SQLSyntax, string LeFile, bool Is_Ordre, int TypeDonne)
{
try
{
using (var connectionWrapper = new Connexion())
{
var connectedConnection = connectionWrapper.GetConnected();
SqlDataAdapter da = new SqlDataAdapter(SQLSyntax, connectionWrapper.conn);
DataSet ds = new DataSet();
da.Fill(ds, "Emp");
DataTable dt = ds.Tables["Emp"];
CreateCSVFile(dt, LeFile, Is_Ordre, TypeDonne);
//Update all lines, it not save in Database
foreach (DataRow row in dt.Rows)
{
row["IS_IMPORT"] = true;
}
}
}
catch (Exception excThrown)
{
throw new Exception(excThrown.Message);
}
}
проблема:
foreach (DataRow row in dt.Rows)
{
row["IS_IMPORT"] = true;
}
это не сохранить его в базе данных.
Заранее спасибо,
Стеф