Variable uses an Automation type not supported in VBScript

  • VB Transformation:  DTSDestination("Field1") = DTSSource("Field2") * -1

    Error:  Variable uses an Automation type not supported in VBScript

     

    What doesn't it like?  How do I multiply by a negative?  It is always multiply by negative 1.  Would just getting the ABS do the same thing?

    Any feedback is appreciated.

  • I've come to find that this issues is occuring because DTSSource("Field2") is 0.  I want to make an

    IF ISNULL(DTSSource("Field2")) and DTSSource("Field2") = 0 Then

    but I keep getting and error.  Is my if formatted iincorrectly?

  • More specifics about my current error:

     

    Statement:  If  DTSSource("Field2") = 0 Or IsNull(DTSSource("Field2"))  Then

    Error:  Expected 'End' ... this is a run time error. This statement parses fine

  • Can't tell much from that one line. Maybe you could post the entire script?

    --------------------
    Colt 45 - the original point and click interface

  • Hey,

    It means there is no End If that it can find.  Make sure of that.

    In addition, if you still have problems, it may be that you want to check null and zero on separate lines (null first).

    Brian

  • I had to do a CINT on all integers coming it ... an ODBC data conversion issue.

     

    Thanks for your replies.

  • Hey,

    Try:

    IF ISNULL(DTSSource("Field2")) Then

      IF DTSSource("Field2") = 0 Then

        'Do whatever

      End If

    End If

    Did you find where a end if or end function may be missing?

    Brian

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

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