Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002

    Post Unanswered: DTS Package troubles

    I'm having trouble getting a DTS package to run properly. I get this error everytime.

    Line 3: Incorrect syntax near 't'.
    The task reported failure on execution.
    Unclosed quotation mark before the character string ' , @width= 250"

    Here is the code:

    strSQL= "EXEC master..xp_sendmail @recipients = '', @subject = 'Insert subject here.', @message = '" & strErrMsg & "', @attach_results = 'FALSE', @width = 250 "

    There is no 't' on line 3. Line 3 is actually commented out. The Job History shows this error for the scheduled package.

    DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1 DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2 DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2 DTSRun OnStart: DTSStep_DTSDataPumpTask_1 DTSRun OnProgress: DTSStep_DTSDataPumpTask_1; 38 Rows have been transformed or copied.; PercentComplete = 0; ProgressCount = 38 DTSRun OnFinish: DTSStep_DTSDataPumpTask_1 DTSRun OnStart: DTSStep_DTSActiveScriptTask_3 DTSRun OnError: DTSStep_DTSActiveScriptTask_3, Error = -2147220421 (8004043B) Error string: The task reported failure on execution. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts.hlp Help context: 1100 Error Detail Records: Error: -2147220421 (8004043B); Provider Error: 0 (0) Error string: The task reported fai. The step failed.

  2. #2
    Join Date
    Feb 2002
    Where are you actually executing the strSQL statement ? Are you executing this DTS in visual basic ? What does strErrMsg return ? I am thinking that the strErrMsg is causing the problem - try inserting an actual text message where strErrMsg is and try again - the strErrMsg may have an apostrophe in it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts