i am trying to print from crystal report but i am getting an error. here is pic of what i want to do pic . the text box is for the users ID. when i type the id then press the button i want to print only that user information. this is my code
if (conect.State != ConnectionState.Open)
{
conect.Open();
}
string cs = "select * from Sign_Up where ID='"+textBox1.Text+"'";
OleDbCommand command = new OleDbCommand(cs, conect);
OleDbDataAdapter adap = new OleDbDataAdapter(command);
DataSet ds = new DataSet();
adap.Fill(ds, "Sign_Up");
CrystalReport1 crs1 = new CrystalReport1();
crs1.SetDataSource(ds.Tables["Sign_Up"]);
crs1.SetDataSource(ds);
crystalReportViewer1.ReportSource = crs1;
conect.Close();
crystalReportViewer1.Refresh();
and this is my error
System.Data.OleDb.OleDbException: 'Data type mismatch in criteria expression.'
at this code adap.Fill(ds, "Sign_Up");
anyone have any suggestions ?