I am currently working on an SSID caller type visual basic program. It executes .dtsx packages from the VB.Net shell. I have all of the code up and running however I cannot seem to write my eventlistener information to a textbox while the .dtsx packages are running. The package will complete it's full execution than all of the data will load to the textbox at once.
-Messageboxes will popup if I put them in the Subs/Functions of EventListener (or the in the StringAppender function you see below) but data will not write to the textbox at that time.
-The stringAppender function that you see in each Sub/Function below basically just writes each input string to an array. I then have a for loop which cycles through the array and writes to the textbox in a different part of the program. I originally tried to write to the textbox in StringAppender but there was no luck.
Thanks for the help.
-Messageboxes will popup if I put them in the Subs/Functions of EventListener (or the in the StringAppender function you see below) but data will not write to the textbox at that time.
-The stringAppender function that you see in each Sub/Function below basically just writes each input string to an array. I then have a for loop which cycles through the array and writes to the textbox in a different part of the program. I originally tried to write to the textbox in StringAppender but there was no luck.
VB.NET:
Public Class EventListener
Inherits DefaultEvents
Public Overrides Sub OnExecutionStatusChanged(exec As Microsoft.SqlServer.Dts.Runtime.Executable, _
newStatus As Microsoft.SqlServer.Dts.Runtime.DTSExecStatus, ByRef fireAgain As Boolean)
Dim information As String = ("information As : " & newStatus & " " & " " & fireAgain)
StringAppender(information)
End Sub
Public Overrides Sub OnProgress(taskHost As Microsoft.SqlServer.Dts.Runtime.TaskHost, progressDescription As String, _
percentComplete As Integer, progressCountLow As Integer, progressCountHigh As Integer, _
subComponent As String, ByRef fireAgain As Boolean)
Dim progressReport As String = ("Progress: " & vbCrLf & progressDescription & " percentComplete " & percentComplete & _
" ProgressCount Low " & progressCountLow & " ProgressCountHigh " & progressCountHigh & vbCrLf)
StringAppender(progressReport)
End Sub
Public Overrides Function OnError(ByVal source As Microsoft.SqlServer.Dts.Runtime.DtsObject, _
ByVal errorCode As Integer, ByVal subComponent As String, ByVal description As String, _
ByVal helpFile As String, ByVal helpContext As Integer, _
ByVal idofInterfaceWithError As String) As Boolean
Dim eventErrors As String = ("Errors in: " & vbCrLf & " " & subComponent & " " & description)
StringAppender(eventErrors)
Return True
End Function
Public Overrides Sub OnWarning(source As Microsoft.SqlServer.Dts.Runtime.DtsObject, warningCode As Integer, _
subComponent As String, description As String, helpFile As String, helpContext As Integer, _
idofInterfaceWithError As String)
Dim eventWarnings As String = ("Warnings in:" & vbCrLf & subComponent & " " & description)
StringAppender(eventWarnings)
End Sub
End Class
End Module
Thanks for the help.