﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Data Warehousing / Data Transformation Services (DTS)  / How to expose TaskHost properties using a Script Task / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 18:20:49 GMT</lastBuildDate><ttl>20</ttl><item><title>How to expose TaskHost properties using a Script Task</title><link>http://www.sqlservercentral.com/Forums/Topic1377013-19-1.aspx</link><description>HiI have built a custom logging feature through the use of the Execute SQL Task SQLStatementSource property, using dynamic SQL that utilise System variables and event handlers.There are some things that are not available through the help of System variables such as task result, tast status etc and I would like to capture these details for the tasks in my packages.I have learned of the TaskHost class - http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.taskhost.aspx and wanted to know is it possible to get the following properties using a script task on an event handler -ExecutionDurationExecutionResultExecutionStatusStartTimeStopTimeI would like to capture these properites and put them into variables using the script task and then my dynamic SQL within the SQLStatementSource property can capture as variables and output when an event handler fires.This is what I would like to and want to know if it what I have described is possible?Any pointers to help me get started would be good as I am still getting familiar with scripting and the Ingteration Services Object Model.Thank you</description><pubDate>Thu, 25 Oct 2012 08:22:53 GMT</pubDate><dc:creator>superstar6778324</dc:creator></item></channel></rss>