A multi-step OLE DB operation produces an error. If possible, check each OLE DB status value. No work was done.

Source: Internet
Author: User
Tags ole

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.