C # does not want to read the code, it marks me completely as an error, I do not know if it's because of the way I'm locking up each case.
the dtpdesde
and dtphasta
are controls DateTimePicker
txtbusqueda
and txtmodelo
are controls TextBox
cbtipo
is a control ComboBox
string sql = new SqlCommand("SELECT * FROM Inventario WHERE Fecha BETWEEN '" + dtpdesde.Text + "' AND '" + dtphasta.Text + "' AND [Descripcion de Articulo]= '" + txtbusqueda.Text + "' AND Marca='" + txtmodelo.Text + "' AND [Tipo de Articulo]='" + cbtipo.SelectedItem + "'");
Error that shoots me:
you can not explicitly convert data to System.Data.SqlClient string