DTEXEC with /SET on 64bit fails

  • Hi,

    When I try to execute a SSIS Script package without any paramater in dtexec utility, it looks okay.

    However if i parameterize and pass the value in the commandöline with /SET option, it simply fails on 64 bit.

    Method 1

    Code :-

    Public Sub Main()

    Dim sServer As String = CStr(Dts.Variables(”myvar”).Value)

    ……

    ….

    Execution :-

    dtexec /FILE “D:\REFRSH.dtsx” /Set \package.variables[myvar].value;SVR

    where SVR is the value intended to be passed.

    OUTPUT :-

    Code: 0×80012017

    Source: REFRSH

    Description: The package path referenced an object that cannot be found: “\pa

    ckage.variables[myvar].value”. This occurs when an attempt is made to resolve a

    package path to an object that cannot be found.

    End Warning

    DTExec: Could not set \package.variables[myvar].value value to SVR.

    Method 2 :

    Dim sServer As Variable = Dts.Variables(”myvar”)

    But resulting exactly the same error message.

    Any ideas ?

    Thanks

  • Try changing the line:

    Dim sServer As Variable = CStr(Dts.Variables(”myvar”).value)

    to

    Dim sServer As String = Dts.Variables("myvar").value.ToString

    This will probably work for you and remember to set the option to precompile the script as required by 64bit.

    Kindest Regards,

    Frank Bazan

Viewing 2 posts - 1 through 2 (of 2 total)

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