The issue is that I'm trying to write into a table called Login. It has a few columns, there's a column with no data in (null) that I'm trying to insert / update the column is SuperSecretKey - nvarchar(100).
Heres the code:
public void InsertSecretKey(String SuperKey, int IDKey)
{
conn = new SqlCeConnection(@"Data Source=|DataDirectory|\Database1.sdf");
conn.Open();
SqlCeCommand cmd = new SqlCeCommand();
cmd.CommandText = "UPDATE Login SET SuperSecretKey = @SuperKey WHERE Key=@IDKEY;";
cmd.Connection = conn;
cmd.Parameters.AddWithValue("@SuperKey", SuperKey);
cmd.Parameters.AddWithValue("@IDKey", IDKey);
cmd.ExecuteNonQuery();
conn.Close();
}
Here's the error:
There was an error parsing the query.
[ Token line number = 1,Token line offset = 51,Token in error = Key ]
Any help? Thanks!