Can anyone tell me how to add data using excel data with 3 columns into database table that has 9 columns.
I'm using this tutorial to bulk my data.
FYI: I'm totally newbie
Thanks & Regards
Hi,
You need to map the Column name link below as Given in article
sqlBulkCopy.ColumnMappings.Add("Id", "PersonId") sqlBulkCopy.ColumnMappings.Add("Name", "Name") sqlBulkCopy.ColumnMappings.Add("Salary", "Salary")
I hope this will help you out.
I found the issue, it seems that I misstype the column name.
@Shshikant: thanks for your attantion and help :)
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.