Video: Handing Schema Mapping When Using SqlBulkCopy
page 1 of 1
Published: 07 Jul 2008
Unedited - Community Contributed
Abstract
In this video, Mohammad Azam demonstrates how to handle schema mapping when using the SqlBulkCopy class to insert bulk data. His demonstration uses non-matching source and destination tables, and he uses mappings to allow the copying. He shows how to statically define mappings as well as how to write code which determines mappings at run-time. [6:12]
by Mohammad Azam
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 11920/ 13

 

View

[Play the Video] - Requires Registration/Login

[Download Sample]

Notes

·         SqlBulkCopy is part of the .NET framework 2.0 which allows developers to perform bulk insert operations.

·         The SqlBulkCopy class uses DataTable or DataReader to perform the bulk insert.

·         SqlBulkCopy includes a mappings collection which enables developers to programmatically copy columns from source table to the destination table.

 

 

 

 

 

 

 

 



User Comments

Title: sqlbulkcopy datatype mismatch   
Name: Nandu
Date: 2011-01-06 10:08:38 AM
Comment:
Hello
I have some data that is validated using XSLT and returns the data in XML format. I am loading this XML data into a SQL Server database using SQLBulkCopy.
Sometimes due to various validation criteria, some of the nodes have blanks (no data populated), but the corresponding datatype in the SQL database is either int or date, etc.
A blank value is considered as a string by SQLBulkCopy and it tries to insert string into date or int type columns.

Is there a way i can convert the blanks into NULL or associate proper datatypes in column mapping?

What's the best way to resolve this issue?
Title: need the download of videos   
Name: vijayaraj
Date: 2008-12-20 5:37:15 AM
Comment:
the videos specified here is nice , but there is no option for download of the videos .


so what should i have to do if i want this videos for downloading, not for playing the videos






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-01-21 10:38:43 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search