Bulk Insert Task NIGHTMARES

  • Hi everyone, i just found this forum and i hope you guys can give me some help.  I have been working and trying to get a program that uses the DTS BulkInsertTask for FAR TOO LONG. 

    I am programming this on Visual Basic 6, and it connects to either a SQL Server 7 or SQL Server 2000.

    Now, i haven't had a problem in a while, but this came up, and i'm stuck...

    here's the error:

    "The: "BulkInsStep" step in the package: "Package" failed.

    ErrorCode: -2147217900

    Source: Microsoft OLE DB Provider for SQL Server Description: The statement has been terminated. (Microsoft OLE DB Provider for SQL Server (80040e14): OLE DB provider 'STREAM' returned an unexpected data length for the fixed-length column '[].test4'. The expected data length is 8000, while the returned data length is 1.) HelpFile:

    HelpContext: 0

    IDofInterfaceWithError: {0C733A63-2A1C-11CE-ADE5-00AA0044773D}"

    An example of the data that caused the error is:

    64872;007-82-5060;PAULA;R;GOODNESS;03

    I can insert some of the columns, but EmpID (first line), MidInital(4th line), and EmployeeType (6th line) mess up almost always.

    I thought it might be my formatfile, but i think it's correct

    7.0

    6

    1 SQLCHAR  0 0 ";" 7 Col1

    2 SQLCHAR  0 0 ";" 1 Col2

    3 SQLCHAR  0 0 ";" 3 Col3

    4 SQLCHAR  0 0 ";" 4 Col4

    5 SQLCHAR  0 0 ";" 2 Col5

    6 SQLCHAR  0 0 "\r\n" 5 Col6

    The DB is

    1 ssn               char        11

    2 last_name      char        20

    3 first_name      char       20

    4 minit              char        1

    5 emp_type       char        5

    6 dte_enter       datetime  8

    7 employee_ID   varchar   10

    8 dte_match     datetime   8

    My program has been working fine for the past week, but this seems to blow it up.

    UGH! i am seriously pulling my hair out over this...and really thinking of scrapping this whole thing and doing it over with a Transform Data Task or something like that...i've had nothing but problesm with the bulkInsert

    thank you for any help

  • Does any of the input have one of your delimiter characters ";" as part of the data, possibly in the line before or after it appears to fail.

  • found it, the error was was 1 sqlchar 0 0

                                                         |

                                                         |

                                                        this should be the max length of the data...i set it to a large number to accept all input

    thanks

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply