what approach are you using? Is it PIA's or COM?
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
You are missing the field mapping just before the Destination Table.
' Set up the column mappings by name.
Dim mapID As New _
SqlBulkCopyColumnMapping("ProductID", "ProdID")
bulkCopy.ColumnMappings.Add(mapID)
You have to do it for all the fields
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
There are diff. overloads for function (SqlBulkCopyColumnMapping)
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
so you mapped all the columns? I would suggest you to create a test table with 2 columns and try this first. This way you can figure out where is the problem.
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
Iam not sure if the bulk copy supports formatting the row colors, But you can do whatever you want with the excel file using .NET PIA's. This gives you the most control over the excel application.
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
Not a problem. Let me know how it goes.
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18
I will be glad to help. I beleive in sharing knowledge. Thats the reason i launched this site www.coderewind.com
binoj_daniel
Practically a Master Poster
645 posts since Dec 2006
Reputation Points: 25
Solved Threads: 18