A multi-step OLE DB operation produces an error. If possible, check each OLE DB status value. No work was done.
The code that generated this error:
Dtcontract_dst. Rows. ADD(Dr. ItemArray);String columns ="";String PARAMSS ="";OleDbCommand Updatecmd = Con_dst. CreateCommand();foreach (DataColumn DCinchDtcontract_dst. Columns) {if (columns = ="") {columns = DC. ColumnName;PARAMSS ="@"+ DC. ColumnName;} else {Colu MNS + =", "+ DC. ColumnName;Paramss + =", @"+ DC. ColumnName;} updatecmd. Parameters. ADD(New OleDbParameter (DC. ColumnName, DC. DataType);} updatecmd. CommandText="INSERT INTO T_contract ("+ Columns +") Values ("+ PARAMSS +")";Updatecmd. ExecuteNonQuery();OleDbDataAdapter dataadap = new OleDbDataAdapter ();Dataadap. InsertCommand= Updatecmd;Dataadap. Update(DTCONTRACT_DST);
Execute dataadap.update (DTCONTRACT_DST); When this error occurs, it is mentioned that the database field type does not match, but my two tables are exactly the same.
The cause and resolution of the problem are not yet found.
A multi-step OLE DB operation produces an error. If possible, check each OLE DB status value. No work was done.