Debugging

  • I have debugging turned on.  An error is registered.  The job stops ant the debugging window comes up.  I know the line it is having issue with but it tells me nothing more.  How do I see the contents of variables/fields and the result of commands/errors.  Here is the line that seems to be the error:

    If DTSSource("Fld1") is null Then

      DTSDestination("Fld1") = DTSSource("Fld1")

    Else

      DTSDestination("Fld1") = "  "

    End if

     

    Any idea what is wrong and guidacne for debugger?

  • should the double quotes be single quotes??

  • Hi,

    Unfortunatly, no guidance on the debugger, althought insterested in the solution for the debugger. However, don't you have the query in the reverse?

    If DTSSource("Fld1") is empty Then

      DTSDestination("Fld1") = "  "

    Else

      DTSDestination("Fld1") = DTSSource("Fld1")

    End if

    I.e., I most likely want to insert " " when there is a NULL.

    Does VBScript knows what a NULL is? Try with empty.

  • Try this:

    IF IsNull(DTSSource("Fld1") = cBool(True) THEN

               DTSDestination("Fld1") = "  "

    ELSE

               DTSDestination("Fld1") = DTSSource("Fld1")

    END IF

  • Hi,

    I was not able to use your solution .

    Can you please, check if it works for you?

    Thanks.

  • Tiago,

    I did miss a ")" in the sample - sorry bout that.

    Try this,

     IF IsNull(DTSSource("Fld1")) = cBool(True) THEN 

                DTSDestination("Fld1") = "  "

     ELSE

                DTSDestination("Fld1") = DTSSource("Fld1")

     END IF

    And don't forget to check for an empty string (TRIM(Fld1) <> "")

  • There is more than one debugger available depending upon your OS.  In A

  • I've gotten the debugger to work fine for dts but we only have it on in our development environment.  When a job fails a window appears with the erroring line.  If you copy that line out and into the command window (A tool bar item in the debugger) then hit enter the error will be display.  It is n't much but it is better than reading the text error files that tell you nothing.

     

    Good Luck

Viewing 8 posts - 1 through 7 (of 7 total)

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