Results 1 to 3 of 3

Thread: DTS Object Model Problem

  1. #1
    Rajesh Chopra Guest

    DTS Object Model Problem

    Hi All,

    Does any body have experience in capturing DTS step error information through VB Script.

    When I run following code , the code in the IF loop is executed but I get 0 as the error number. Please note that stp_sql points to an Execute SQL task and the execute SQL task is failing and this script is executed on completion ( not success) of the Execute SQL task.

    If stp_sql.ExecutionStatus = DTSStepExecStat_Completed And _
    stp_sql.ExecutionResult = DTSStepExecResult_Failure Then

    stp_sql.GetExecutionErrorInfo CLng(error_code)

    msgbox CLng(error_code)

    end if

    Any help is appreciated.

    Rajesh

  2. #2
    Paul Guest

    DTS Object Model Problem (reply)

    The best way to error handle in the VBscript part of DTS is to write the 'dodgy' rows to an error table and let it carry on. You can email all the relevant error info. on the fly. If you have a front-end based on the error table then the errored rows can be easily scrutinised.


    ------------
    Rajesh Chopra at 6/21/01 11:35:38 AM

    Hi All,

    Does any body have experience in capturing DTS step error information through VB Script.

    When I run following code , the code in the IF loop is executed but I get 0 as the error number. Please note that stp_sql points to an Execute SQL task and the execute SQL task is failing and this script is executed on completion ( not success) of the Execute SQL task.

    If stp_sql.ExecutionStatus = DTSStepExecStat_Completed And _
    stp_sql.ExecutionResult = DTSStepExecResult_Failure Then

    stp_sql.GetExecutionErrorInfo CLng(error_code)

    msgbox CLng(error_code)

    end if

    Any help is appreciated.

    Rajesh

  3. #3
    Guest

    DTS Object Model Problem (reply)

    Thanks Paul. I will try this.


    ------------
    Paul at 6/25/01 9:02:36 AM

    The best way to error handle in the VBscript part of DTS is to write the 'dodgy' rows to an error table and let it carry on. You can email all the relevant error info. on the fly. If you have a front-end based on the error table then the errored rows can be easily scrutinised.


    ------------
    Rajesh Chopra at 6/21/01 11:35:38 AM

    Hi All,

    Does any body have experience in capturing DTS step error information through VB Script.

    When I run following code , the code in the IF loop is executed but I get 0 as the error number. Please note that stp_sql points to an Execute SQL task and the execute SQL task is failing and this script is executed on completion ( not success) of the Execute SQL task.

    If stp_sql.ExecutionStatus = DTSStepExecStat_Completed And _
    stp_sql.ExecutionResult = DTSStepExecResult_Failure Then

    stp_sql.GetExecutionErrorInfo CLng(error_code)

    msgbox CLng(error_code)

    end if

    Any help is appreciated.

    Rajesh

Posting Permissions

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