1
I’m having a problem trying to make an appointment at a Select
and bring the information on TextBox
.
There is no mapping of the System.Windows.Forms.Toolstriptextbox object type to a native type managed provider.'
Code:
if ((Keys)e.KeyChar == Keys.Enter)
{
SqlConnection con = ConectDAO.abrir();
SqlCommand conexao = new SqlCommand("SELECT RAZãO_SOCIAL FROM BANCODEDADOSCENTRAL WHERE CNPJ = ? ", con);
conexao.Parameters.AddWithValue("@CNPJ", SqlDbType.Int);
conexao.Parameters["@CNPJ"].Value = toolStripTXT_Pesq_Cnpj;
conexao.CommandType = CommandType.Text;
SqlDataReader dr;
dr = conexao.ExecuteReader();
dr.Read();
txt_razao.Text = dr.GetString(0);
}
was that . text at the end. obg solved
– MAGUIM