The given ColumnMapping does not match up with any column in the source or destination.
a few seconds ago|LINK
Hi i want to import the excel sheet into database,at the same time of importing am copying the data into table,2 excel sheets are imported and data is copied but when i try to import another excel sheet it showing error like this
The given ColumnMapping does not match up with any column in the source or destination.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The given ColumnMapping does not match up with any column in the source or destination.
Source Error:
Line 88: //Give your Destination table name
Line 89: sqlBulk.DestinationTableName = tableName;
Line 90: sqlBulk.WriteToServer(dReader); Line 91: excelConnection.Close();
Line 92: conn.Close();
Source File: D:\pratyusha\project\pay description\pay description\upload2.aspx.cs Line: 90
Stack Trace:
[InvalidOperationException: The given ColumnMapping does not match up with any column in the source or destination.]
System.Data.SqlClient.SqlBulkCopy.AnalyzeTargetAndCreateUpdateBulkCommand(BulkCopySimpleResultSet internalResults) +978472
System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal() +1393
System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServer(Int32 columnCount) +955
System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader) +159
pay_description.upload2.ImportNow_Click(Object sender, EventArgs e) in D:\pratyusha\project\pay description\pay description\upload2.aspx.cs:90
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
manimala