title: Update command using Npgsql postgres and C#
body: <p>I have created a search form to locate a record based on a search value called license ID. I am able to pull the all the fields for that value. My question is I am trying to update any field for that record, example if I want to update the address field or the zip code field which all these field values are in text boxes.  I get an syntax error at or near ""Lname"". Lname is the database field name for last name. This project is just a test project to get familiar with Postgres. Here is my source code. I am not sure what the problems is, the field name is correctly specified. </p>
  
  <pre><code> private void UpdateRecord()
      {
          try
          {
              NpgsqlConnection conn = Connection.getConnection();
              conn.Open();
  
              NpgsqlCommand cmd = new NpgsqlCommand("update info set \"Fname\" = :FirstName, set \"Lname\" = :LastName, set \"Address\" = :Address," +
                  "set \"City\" = :City, set \"State\" = State, set \"Zip\" = :Zip," + 
                  "set \"PhoneNumber\" = :PhoneNumber where \"LicenceNumber\" = '" + LicenseID + "' ;", conn);
  
              cmd.Parameters.Add(new NpgsqlParameter("FirstName", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters.Add(new NpgsqlParameter("LastName", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters.Add(new NpgsqlParameter("Address", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters.Add(new NpgsqlParameter("City", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters.Add(new NpgsqlParameter("State", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters.Add(new NpgsqlParameter("Zip", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters.Add(new NpgsqlParameter("PhoneNumber", NpgsqlTypes.NpgsqlDbType.Text));
              cmd.Parameters[0].Value = txtFirstName.Text;
              cmd.Parameters[1].Value = txtLastName.Text;
              cmd.Parameters[2].Value = txtAddress.Text;
              cmd.Parameters[3].Value = txtCity.Text;
              cmd.Parameters[4].Value = cboState.Text;
              cmd.Parameters[5].Value = txtZip.Text;
              cmd.Parameters[6].Value = mtxtPhoneNumber.Text;
  
              cmd.ExecuteNonQuery();
              conn.Close();
          }
  
          catch (Exception ex)
          {
              MessageBox.Show(ex.ToString());
          }
  </code></pre>