Question In my select variable I cant get it to work correctly each time I run it get
ORA-0096 missing expression
I'm thinking it has something to do with the quotes. What I want to do do is search all of my records where the date is between my start_dp(datetimepicker) and my end_dp(datetimepicker) Any help would be greatly appreciated.
string cr;
cr = "SELECT * FROM con_dates WHERE DATE BETWEEN " + start_dp.Value.Date + " and " + end_dp.Value.Date + "";
I tried this expression with params but still the same exact error for oracle Date is a datetime data type and the value.date of both pickers should just be the date so I am not sure what is going on here...
OracleCommand cmd = new OracleCommand("SELECT * FROM con_dates WHERE ""date"" between :start and :end", dvconn);
cmd.Parameters.Add(new OracleParameter("start", start_dp.Value.Date));
cmd.Parameters.Add(new OracleParameter("end", end_dp.Value.date));