[Execute SQL Task] Error

  • Hi All

    i have create an SSIS and add an onerror in the event handler i added Execute SQL Task which worked fine all this time now it stopped work i deleted it an add a new one but still give me this error ([Execute SQL Task] Error: Executing the query "INSERT INTO [SIT].[dbo].[ FileNameError] ([P..." failed with the following error: "Incorrect syntax near 'SIT'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.)

    and this is my insert statement "INSERT INTO [SIT].[dbo].[FileNameError] ([FileName],[ErrorCode] ,[ErrorDescription])

    VALUES('"+ (DT_STR,255,1252) @[User::ErrFileName] +"'," + (DT_STR, 15, 1252) @[System::ErrorCode] + ",'" + (DT_STR, 1000, 1252) @[System::SourceName] + " :"+ (DT_STR, 1000, 1252) @[System::ErrorDescription] + "')"

    plz help.

    Regards LeeLuv

  • It's an expression. Probably the error is due to the values in the variables when it tries to evaluate the expression to produce the statement.


    Cursors never.
    DTS - only when needed and never to control.

  • Hi nigelrivett

    thanx for ur help u are Right a added an Replace and is working fine now

    "INSERT INTO [SIT].[dbo].[FileNameError] ([FileName],[ErrorCode] ,[ErrorDescription])

    VALUES('"+ (DT_STR,255,1252) @[User::ErrFileName] +"'," + (DT_STR, 15, 1252) @[System::ErrorCode] + ",'" + REPLACE((DT_STR, 1000, 1252) @[System::SourceName] + " :"+ (DT_STR, 1000, 1252) @[System::ErrorDescription],"'","")+ "')"

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

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