November 11, 2010 at 12:21 am
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
November 11, 2010 at 9:20 am
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.
November 11, 2010 at 11:36 pm
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 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy