SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


[Execute SQL Task] Error


[Execute SQL Task] Error

Author
Message
LeeLuv
LeeLuv
Valued Member
Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)

Group: General Forum Members
Points: 62 Visits: 176
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
nigelrivett
nigelrivett
Mr or Mrs. 500
Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)Mr or Mrs. 500 (598 reputation)

Group: General Forum Members
Points: 598 Visits: 211
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.

LeeLuv
LeeLuv
Valued Member
Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)Valued Member (62 reputation)

Group: General Forum Members
Points: 62 Visits: 176
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],"'","")+ "')"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search