これは、SQL 実行タスクから 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) {
プレ>ここで、データ タスク内から SQL を抽出する方法を理解できれば:
MainPipe pipeline = taskHost.InnerObject as MainPipe; if (pipeline != null) { foreach (IDTSComponentMetaData100 componentMetadata in pipeline.ComponentMetaDataCollection) { try {???
を試す プレ>さて何??