" how can i remove this exception  ?.....Data type mismatch in criteria expression.";
"here is attechment of code.";
"

            con.Open();
            OleDbCommand com = new OleDbCommand("INSERT INTO grn(GRNID,PO,REMARKS,VENDERSID,STATUS,DELEVERYDATE,GRNAMMOUNT)Values(@GRNID,@PO,@REMARKS,@VENDERSID,@STATUS,@DELEVERYDATE,@GRNAMMOUNT)", con);
            com.Parameters.AddWithValue("@GRNID", textBox1.Text);
            com.Parameters.AddWithValue("@PO", comboBox2.Text);
            com.Parameters.AddWithValue("@REMARKS", textBox3.Text);
            com.Parameters.AddWithValue("@VENDERSID", textBox8.Text);
            com.Parameters.AddWithValue("@STATUS", textBox6.Text);
            com.Parameters.AddWithValue("@DELEVERYDATE", dateTimePicker2.Text);
            com.Parameters.AddWithValue("@GRNAMMOUNT", textBox7.Text);
            com.ExecuteNonQuery();
            MessageBox.Show("Your Record is inserted successfully...");
            con.Close(); ";
com.Parameters.AddWithValue("@DELEVERYDATE", dateTimePicker2.Value.ToString("yyyyMMdd hh:mm:ss:fff"));
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.