August 21, 2008 at 3:46 pm
Hello and TIA.
I'm a bit of a noob at using SSIS so please bear with me. I've created a number of packages to automate importing data from various sources. These are meant to be executed by a specific user. Originally, I was deploying the packages themselves but have been tasked to provide a GUI.
I can load packages and execute them fine through a VB.Net 2005 app. When there is an exception thrown, however, the application hangs. I have included an event handler which captures the OnError event and will message the user. What do I need to do in order to get the application to respond to user control again? (I end up using task manager to kill the process).
This is what I've tried so far:
Private Sub packageError(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) Handles eventListener.PackageError
ssisPackage.SuspendExecution()
ssisPackage.Dispose()
ssisPackage = Nothing
MsgBox("Error - Execution Cancelled (ERROR EVENT)")
End Sub
The Msgbox works but everything hangs after that. Am I missing something in the Package properties and/or setup? Is there a function or process that I'm not following correctly when trying to stop the package from executing?
Corey
August 21, 2008 at 4:06 pm
It sounds as if your app still needs to interact with the package but you killed it in your procedure.
You could try to run the app in debug mode to see (hopefully) where the execution jumps to after you close the msgbox.
Also, I wondering what would happen if you commented out the
ssisPackage.Dispose()
ssisPackage = Nothing
and executed those later.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
August 22, 2008 at 9:40 am
Thanks for the response, I'll try commenting out those lines and see what happens. But I can't run it in debug mode since the TaskHost object throws an exception in Debug mode.
"The script threw an exception: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."
August 22, 2008 at 9:57 am
THANKS! Removing those did work. There was a huge logical breakdown in the workflow process that I found this morning. Removed the lines and properly directed the workflow and now it works as intended.
Appreciate the help 🙂
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply