DataTable dt = new DataTable(); string custname = cust_name_txt.Text.ToString(); Int32 chassi, engine; bool result = Int32.TryParse(cust_chassi_no_txt.Text, out chassi); bool res2 = Int32.TryParse(sales_engine_no_txt.Text, out engine); string month = sale_month_cmb.Text; OleDbDataAdapter da = new OleDbDataAdapter("select * from sales WHERE [Customer Name] = '" + custname + "' OR [Chassi Number] = '" + chassi + "' OR [Engine Number] = '" + engine + "' OR [Month of Sale] = '" + month + "' ", con); con.Open(); da.Fill(dt); //Data type mismatch in criteria expression. occurs here.. dataGridView1.DataSource = dt; con.Close();
'1 '
'1'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)