Donny Ma
Thanks for the clarification about not being able to self-modify a package. I am following Kirk's example of loading a package and then trying to set its properties. I'm now running into the problem that "Mainpipe" is not a recognized type. I have the imports statements from the help link you gave me earlier. Is there something else I am missing We're getting closer to the answer, and thanks for your help!
Imports
System
Imports
System.Data
Imports
System.Math
Imports
Microsoft.SqlServer.Dts.Runtime
Imports
Microsoft.SqlServer.Dts.Pipeline
Imports
Microsoft.SqlServer.Dts.Pipeline.Wrapper
Public
Class ScriptMain
'
Public Sub Main()
'
'
Dim app As Microsoft.SqlServer.Dts.Runtime.Application = New Application()
Dim package As Microsoft.SqlServer.Dts.Runtime.Package = _
app.LoadPackage(
"c:\systime\ExcelOut\ExcelOut\ExcelOutDo.dtsx", Nothing)
Dim e As Executable = package.Executables(0)
Dim thMainPipe As Microsoft.SqlServer.Dts.Runtime.TaskHost = _
CType(e, Microsoft.SqlServer.Dts.Runtime.TaskHost)
Dim dataFlowTask As MainPipe = CType(thMainPipe.InnerObject, MainPipe)
Console.WriteLine(dataFlowTask.pathcollection.count)
Dts.TaskResult = Dts.Results.Success
End Sub
End Class