Soulfire
Soulfire

Reputation: 4296

How do I send SSIS log information to a text box when executing a package from C#?

I have a button that, when clicked, will execute an SSIS package at a location specified by the user. This functionality works fine, but what I am particularly interested in is relaying information about package execution back to the user in the UI.

Is it possible to write the log messages to a textbox OR somehow display the package execution progress window to the user?

By "Package Execution Progress" window I mean this window: SSIS Package Execution Progress window

I am aware that the Package.Execute() contains an IDTSLogging parameter, but I do not know if that is what I need because I haven't been able to find an applicable code example and I am very new to C#. Most of the code examples I've seen that execute an SSIS package do not include any parameters in the Execute method.

I do not want to write information to a separate log file, as a matter of personal preference. I considered writing log output to a file (I have a working example of this I could use) and then reading the contents of that file into the textbox using the File.ReadAllText method, but that seems highly inefficient. If need be, this may work as a last resort.

Thank you for your time and consideration!

Upvotes: 0

Views: 364

Answers (1)

Joost
Joost

Reputation: 1913

See this Example, downside is that the log is available after the package is ready. enter image description here

Upvotes: 1

Related Questions