0
내 코드에 어떤 문제가 있습니까? 업데이트는 db에 저장되지 않습니다.행이 변경된 후 SQLite 데이터베이스가 업데이트되지 않습니다.
SQLiteConnection connection = new SQLiteConnection(string.Format(@"Data Source={0}\statistik.s3db",Application.StartupPath));
connection.Open();
SQLiteDataAdapter db = new SQLiteDataAdapter("SELECT * FROM log WHERE Typ=1", connection);
DataSet ds = new DataSet();
db.Fill(ds);
SQLiteCommandBuilder builder = new SQLiteCommandBuilder(db);
foreach (DataRow row in ds.Tables[0].Rows)
{
row["Message"] = "myupdatedmessage"; // IS NOT SAVED!
}
ds.AcceptChanges();
db.UpdateCommand = builder.GetUpdateCommand();
db.Update(ds.Tables[0]);
connection.Close();
감사합니다. 10 분 안에 대답 한계를 받아 들일거야. – daniel