Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Best practice for variable manipulation?

$
0
0
I was wondering what the pros and cons to alter the variables in a script task or expression editor are. I have been changing values in the Script task since I could walk through the script and see the values in the debugger. I also think C# along with its intellisense is much easier than the expression language to use. For example in all my packages I use two package parameters, prmDirectoryRoot and prmEnvironment. Then I build my variables, varDirectoryStaging, varDirectoryOutbound and varDirectoryArchive in my script. My code looks sort of like below. I left out the detailed syntax.--Build the variablesvarDirectoryStaging = prmDirectoryRoot + "\\" + prmEnvironment + "\\" STAGING--Create the directories if they exist..File.IO.CreateDirectory(varDirectoryStaging)Thoughts?

Viewing all articles
Browse latest Browse all 3145

Trending Articles