You must Sign In to post a response.
  • Category: ASP.NET

    Error..The given ColumnMapping does not match up with any column in the source or destinat

    hi

    i m getting error when filling data from datatable to sql server database....using sqlbulk
    ....this is column mapping code that i m using

    bulkCopy.ColumnMappings.Add("AGNTNUM", "AGNTNUM");
    bulkCopy.ColumnMappings.Add("ARACDE", "ARACDE");
    bulkCopy.ColumnMappings.Add("BATCACTYR", "BATCACTYR");
    ................
    error is
    The given ColumnMapping does not match up with any column in the source or destination.

    how to solve this ..plz explain
    thanks in advance
  • #435697
    What I have found is that the table columns must at least match the columns of the input. If the input has more columns you will receive the error. The table receiving the input can have more columns. The input may have columns that are empty but they still need to be accounted for.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.