public void doupdate(string phone, string name, int id) { SqlCeCommand DAUpdateCmd; DataSet ds = new DataSet(); SqlCeConnection con = new SqlCeConnection(@"Data Source=C:\\users.sdf"); con.Open(); SqlCeDataAdapter da = new SqlCeDataAdapter("SELECT * from members ORDER BY id", con); DAUpdateCmd = new SqlCeCommand("INSERT INTO members(phone, name) VALUES(@phone,@name) WHERE id = 'id', con"); da.UpdateCommand = DAUpdateCmd; da.Fill(ds, "members"); da.Update(ds, "members"); con.Close();