I have a question.
I have to insert oracle table values in Access database.
I am storing oracle table values in datatable(dt).
In oracle and Access database "Net" field is a "Number"
Trying to insert "Net" field in access datatype i am getting following exception.
"Data type mismatch in criteria expression."
I have found out the reason is "Net" field value in oracle table is EMPTY ("").
What i did is trying to check the field IsNullOrEmpty, if it is Empty then i want to store null value into "Net" field(In Access database).
I have made some code change after that also receiving the same error message .
""Data type mismatch in criteria expression."
Please help me how to fix this.
What I have tried:
strNet = !string.IsNullOrEmpty(dr["NET"].ToString()) ? dr["NET"].ToString() : null;
if (dt.Rows.Count > 0)
foreach (DataRow dr in dt.Rows)
sInsertValues= "'" + strNet + "'";
insertAEdetails.ParmValue = sInsertValues;