SSIS - Is there some type of intellisense to add variables when in Script task editor?

  • Hello,

    I am just curious if there is some type of way to insert variables without having to type them in:

    iDaysOld = CInt(Dts.Variables("User::DaysBack").Value)

    I was reading the errors and on one of them, I had mistyped the variable name.

    Just curious if there was a better way to insert variables.

    Thanks,

    Tony

    Things will work out.  Get back up, change some parameters and recode.

  • In the epxression editor you can drag-and-drop them from the Variables pane into the expression writing area. Same deal with the Functions pane. I do not know of an IntelliSense solution.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Hi,

    Thanks for responding.

    How about when you are in the script editor from the script task?

    I added a script task, then went into the script editor to add some code. I don't see anyway to add the variables but to hard code them. It appears that the script editor is case sensitive. So if you don't put the variable in the code exactly as it is in the variables dialog, your code won't work.

    It may be that hard coding variables is the only way to add variables to the script editor, but I thought I would ask.

    Thanks.

    Things will work out.  Get back up, change some parameters and recode.

  • Gotcha, the script editor, not the expression editor.

    The DTS variables collection has to be accessed using a string literal indexer, so not, there is no IntelliSense there. And yes, it's case-sensitive for string-literals following the .NET programming domain you're in when you're in a Script Task.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Ok, so you have to just type it out and make sure you type it correctly.

    Thanks. It was worth asking.

    Tony

    Things will work out.  Get back up, change some parameters and recode.

Viewing 5 posts - 1 through 4 (of 4 total)

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