Look at your code.
You execute a command on a DataAdapter before you add the parameters.
And you try to fill a DataSet from an UPDATE command, which is weird and unlikely to work.
Use a command instead:
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("UPDATE employee SET empName=@Name,empContact=@Contact,EmpAddress=@address WHERE empId=@ID", con);
{
cmd.Parameters.AddWithValue("@ID", emp.Id);
cmd.Parameters.AddWithValue("@Name", emp.Name);
cmd.Parameters.AddWithValue("@Contact", emp.Contact);
cmd.Parameters.AddWithValue("@address", emp.Address);
cmd.ExecuteNonQuery();
}
}
And don't hardcode connection strings! Always store them in a config file so that they only need to be changed in one place.