I'm not sure which sqlite version that you're using. Then if just according to the error information, you should specify the PrimaryKey
for your table.
For example, like the following:
public class Registration_class
{
[PrimaryKey, AutoIncrement]
public int Id {get;set;}
public string name { get; set; }
public int numOfSeat { get; set; }
public string password { get; set; }
}
Then I will point out another wrong place in your code. If you want to execute the sql statement directly, you should use db.Execute("UPDATE Registration_class SET numOfSeat = 300");
method, not Update
method.
My code sample was based on Diederik's blog:Using SQLite on the Universal Windows Platform