Symptoms
This article describes one possible reason as to why a Data Transformation Services (DTS) package created in Microsoft Visual Basic code may fail with an access violation (AV) error message.
When you create a DTS package by using the WITHEVENTS keyword, and you then run the DTS package from within Microsoft Visual Basic code, the package fails with an access violation and the following error message occurs:

Microsoft dts package provider generated code execution exception;
exception access violation 2147221499.Need to run the object to
perform this operation.
Resolution
The following five events are associated with a DTS package when the DTS package is created by using the WITHEVENTS clause:

Private Sub <object>_OnError(ByVal EventSource As String, _ByVal ErrorCode As Long, _ByVal Source As String, _ByVal Description As String, _ByVal HelpFile As String, _ByVal HelpContext As Long, _ByVal IDofInterfaceWithError As String, _ByRef pbCancel As Boolean)Private Sub <object>_OnFinish(ByVal EventSource As String)Private Sub <object>_OnProgress(ByVal EventSource As String, _ByVal ProgressDescription As String, _ByVal PercentComplete As Long, _ByVal ProgressCountLow As Long, _ByVal ProgressCountHigh As Long)Private Sub <object>_OnQueryCancel(ByVal EventSource As String, _ByRef pbCancel As Boolean)Private Sub <object>_OnStart(ByVal EventSource As String)If code for these events is not present, the error message described in the “Symptoms” section occurs.
For more information about these events, please see the following article in the Microsoft Knowledge Base:
221193?(http://support.microsoft.com/kb/221193/) How to install Data Transformation Services (DTS) event handlers in Visual Basic