Thursday, March 12, 2009

Programming Script Task in SSIS 2008 : Dts object / ScriptObjectModel class

I'm reading: Programming Script Task in SSIS 2008 : Dts object / ScriptObjectModel classTweet this !
The Dts object is actually a property on your package that is an instance of the Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptObjectModel. The Dts object provides a window into the package in which your script executes. The Dts object has properties and methods that allow you to interact with the package.

While programming the script task, below collections in the form of properties, provides seamless access to package components. Using the managed assemblies, the scope open up even beyond the limits of SSIS.

Below mentioned are links and description to the public properties of DTS object:
  • Connections: Returns the Connections collection of existing connections defined in the package that contains the Script task.

  • Events: Returns the collection of existing events defined in the package that contains the Script task.

  • ExecutionValue: Gets or sets a user-defined object that provides additional information about the results of task execution.

  • TaskResult: Returns the result of the Script Task which is an DTSExecResult enumeration value.

  • Transaction: Returns the transaction associated with the container of the Script task.

  • VariableDispenser: Returns the VariableDispenser that can be used within the Script task to work with existing variables. The VariableDispenser object provides methods for locking variables for read - only or read - write access and then retrieving them. Initially this was the standard way of accessing variables in scripts. The reason for the explicit locking mechanism is to allow control in the Script Task to keep two processes from competing for accessing and changing a variable.

  • Variables: Returns the Variables collection of existing variables defined in the package that contains the Script task.

Reference: MSDN BOL

No comments:

Related Posts with Thumbnails