Additional information: The input character string was not in a correct format

Asked

Viewed 121 times

1

What’s wrong with my code?

conexao.conectarBD();
conectar.Open();
comando.CommandType = CommandType.StoredProcedure;

comando = new SqlCommand("INSERIR_CLIENTE", conectar);
comando.Parameters.AddWithValue("@CODIGO", Convert.ToInt32(txtCodigo.Text));
comando.Parameters.AddWithValue("@NOME", txtNome.Text);
comando.Parameters.AddWithValue("@TELEFONE", txtTelefone.Text);

comando.ExecuteNonQuery();
MessageBox.Show("DEU BOM!");
  • INSERIR_CLIENTE that’s right?

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.