Hello, I want to insert cell value to my database. Here's my code:
VB.NET Code:
private void UpdateMD5Record(string fn, string md5) { m_dbConnection.Open(); SQLiteCommand command = new SQLiteCommand("PRAGMA foreign_keys = ON", m_dbConnection); command.ExecuteNonQuery(); string sql = @"UPDATE 'tbl_programs' " + @"SET('txt_md5' = :md5) " + @"WHERE ('txt_programName' = :pn" + @"); "; command = new SQLiteCommand(sql, m_dbConnection); command.Parameters.AddWithValue("md5", md5); command.Parameters.AddWithValue("pn", fn); command.ExecuteNonQuery(); m_dbConnection.Close(); }
However I'm getting this error:
Can anyone help me?An unhandled exception of type 'System.Data.SQLite.SQLiteException' occurred in System.Data.SQLite.dll
Additional information: SQL logic error or missing database
near "=": syntax error




Reply With Quote
