Hello,
Welcome to our Microsoft Q&A platform!
You should delete the " ` " symbol in your CommandText
like following code.
public bool UpdateTable(JDictTable jDictTable)
{
try
{
using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "JDictTable.db")))
{
SQLite.SQLiteCommand com = new SQLite.SQLiteCommand(connection);
com.CommandText = "UPDATE JDictTable SET isFavorite =" + true + " WHERE ID = " + jDictTable.Id + "";
com.ExecuteNonQuery();
// con.Close();
return true;
}
}
catch (SQLiteException ex)
{
Log.Info("SQLiteEx", ex.Message);
return false;
}
}
I make a test(I update item, id=2, name= test2). it is working, here is running screenshot.
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.