Oto jak pobrałem SQL z zadania Execute SQl:
foreach (Executable executable in _Package.Executables)
{
TaskHost taskHost = executable as TaskHost;
if (taskHost != null)
{
string taskHostName = taskHost.Name;
System.Diagnostics.Debug.WriteLine("SSIS Task=" + taskHostName);
IDTSExecuteSQL iDTSExecuteSQL;
try
{
iDTSExecuteSQL = (IDTSExecuteSQL)taskHost.InnerObject as IDTSExecuteSQL;
if (iDTSExecuteSQL != null)
{
Teraz, jeśli mogę tylko dowiedzieć się, jak wyodrębnić sqls z zadania danych:
MainPipe pipeline = taskHost.InnerObject as MainPipe;
if (pipeline != null)
{
foreach (IDTSComponentMetaData100 componentMetadata in pipeline.ComponentMetaDataCollection)
{
try
{???
Co teraz??