Setting a variable using EvaluateAsExpression property

  • Seems like this should be simple, but its not working. I'm simply trying to set a string variable called strSQL using the EvaluateAsExpression property i my package. Here's what I'm setting it to:

    "SET FMTONLY OFF EXEC PROVIDER_DIRECTORIES " + @[User::InsurerID]

    InsurerID has a prefilled in value of 23

    So strSQL string variable in the package would be:

    SET FMTONLY OFF EXEC PROVIDER_DIRECTORIES 23

    The error I'm getting is:

    The expression for variable "strSQL" failed evaluation. There was an error in the expression.

    I'm not sure what I'm doing wrong. can someone help?

    Thanks!

    Strick

  • Is your varible InsurerID of type int? If it is then you need to convert it to string type for concatination.

    "SET FMTONLY OFF EXEC PROVIDER_DIRECTORIES " + (DT_WSTR, 15) @[User::InsurerID]

    HTH

    ~Mukti

  • Hi,

    Yes its an int datatype. I'll try that thanks!

    Strick

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

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