3
SqlCommand comm =
new SqlCommand("UPDATE Contatos Set Telefone=" + " ' " + txtTelefone.Text + " ' " + ",Cidade=" + " ' " + txtCidade.Text + " ' " + ",Email=" + " ' " + txtEmail.Text + " ' " + ",Endereco=" + " ' " + txtEndereco.Text + " ' " + "WHERE Nome=" + txtNome.Text, conn);
Error: "Column name 'the name that is in the invalid txtNome". The error message shows as if I was trying to find the name of a column, where the column name is txtNome.Text. My intention was for the sql command to update the contact information according to its name. I have little experience with sql and can’t see where my error is.
True, I’ll test it like this. It’s even better to understand.
– Bruno Brito