yeah last parameter added is wrong
UpdateCommand.Parameters.AddWithValue("@EmID", tempEmId);
It should be
UpdateCommand.Parameters.AddWithValue("@tempEmId", tempEmId);
and one more
UpdateCommand.Parameters.AddWithValue("@tempLogId", tempLogId);
Carefully check the spellings and no. of parameters required. You only need four parameters
@name
@password
@tempEmId
@tempLogId