SSIS set variable at RunTime

  • I have a very simple package,

    Oledb Source > SQL Command >

    Select * from TableA where Date= ?

    ** Date datatype is DateTime in TableA

    Going Into

    Oledb Destination > sql Table B

    SSIS Variable

    Name : Date

    Data Type : DateTime

    Value : 3/3/2010

    Forced Execution Value : Default

    Forced ExecutionValuType: DateTime

    Forced ExecutionValue : True

    I have no problem executing this package, Table B get loaded with rows accordingly based on the value supplied to the Date parameter.

    The only problem is, I get the following error mssg

    Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "OLE DB Destination" (198)" wrote 11 rows.

    Error: 0xC001F009 at Package: The type of the value being assigned to variable "User::Date" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.Task failed: Data Flow Task

    Error: 0xC0019001 at Data Flow Task: The wrapper was unable to set the value of the variable specified in the ExecutionValueVariable property.Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.

    SSIS package "Package.dtsx" finished: Failure.

    The program '[11460] Package.dtsx: DTS' has exited with code 0 (0x0).

    How can I eliminate this error ?

  • I would look again at the exact data type of the variable, and the exact data type of the value you are trying to assign to the variable. Make sure they are the same....not compatable but the same.

  • They are both of type DateTime

  • Double check the data in table A. I may be misreading the error, but indicates the error happened around row 11 or 12. I would look for an odd bit of data in your date time field there. If there is no problem with the data, try an explicit cast to DATETIME. It might be a bit easier to troubleshoot if you start looking at the data and cast in T-SQL first.

  • They are only 11 rows in tableA that specify the date condition, I'll check on Casting the dates and update, Thanks

Viewing 5 posts - 1 through 4 (of 4 total)

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