You may also review the tabbed page, Progress, on the Canvas to look at the
details of the processing steps.
What Happens if there Is an Error?
Format errors can exist in the text file. For example, the second row may have an
error in the date format (2//2/2007 instead of 2/2/2007). When this file is used
for inserting, the Bulk Insert Task turns red. A review of the tabbed page Progress
indicates that there was a data conversion error flagged, as follows:
"[Bulk Insert Task] Error: An error occurred with the following error message: "Bulk
load data conversion error (type mismatch or invalid character for the specified
codepage) for row 3, column 4 (CRdate)".
Chapter 7
[ 133 ]
However, you should notice that except for that row ("Mary Poppins" is missing),
all other rows are inserted into the table as seen in the Microsoft SQL Server
Management Studio shown in the following screenshot. Make sure you refresh the
server objects to see the changes as well as stop debugging the project in Visual
Studio 2005.
Summary
The Bulk Insert Task configuration was described in detail. Input text files can have
various types of errors. The error messages can be used to debug the errors. Bulk
Insert Task used the default format option "Specify" for loading the text file. It has
another option, "use file", which would require a format file. The format file can be
generated using the SQL Server 2005's BCP.exe utility. If any data transformation is
needed, then a better option is to use the Data Flow Task.
Pages:
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106