DateTimePicker.Text in oracle using c#
Hi Experts,
Please I need your help because I am developing a tool that will take a value from DateTimePicker.Text and update an oracle database date; however I am getting the following error(ORA-00932: inconsistent datatypes: expected DATE got NUMBER), and I google the error message if I can get some kind of idea on what to do but no luck and I try convert to date-no luck. Please help! Below is my code using c#
private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
label9.Text = dateTimePicker1.Text;
}
private void conn3(string oradb3)
{
OracleConnection conn = new OracleConnection(oradb3);
conn.Open();
//Create an OracleCommand object using the connection object
OracleCommand cmd = new OracleCommand("", conn);
// Start a transaction
OracleTransaction txn = conn.BeginTransaction(IsolationLevel.ReadCommitted);
cmd.CommandText = "update logical_date set logical_date= " + label9.Text + " where expiration_date is null";
{
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
txn.Commit();
}
}