all groups > sql server dts > august 2003 >
You're in the

sql server dts

group:

error from an EXE app. using WithEvents with DTS.Pacakage2


error from an EXE app. using WithEvents with DTS.Pacakage2 Rocio Katsanis
8/28/2003 12:44:41 PM
sql server dts:
Hi ,

I have a VB6 program that runs a DTS package.
I addedd the WithEvents keyword to the declaration of
DTS.Package, becuase I need to find out the status of my
program while it is running.
It works fine from within VB6, but it breaks down when I
create a EXE file and run the EXE file.

This error is generated when the line in the code that
executes the pacakage is encountered:

The instruction at "0x6601452b" referenced memory
at "0x0000000c". The memory could not be "read".

Not even the oPacakage_OnStart event is fired.

Any ideas?
The funny thing is that, if I remove the WithEvents
keyword from the declaration of DTS.Package, the EXE file
does not crash....but I do not get to see any messages
during the execution of the program.


Re: error from an EXE app. using WithEvents with DTS.Pacakage2 (johanjvr NO[at]SPAM y.co.za)
8/30/2003 3:35:40 PM
Hi I found this on another forum

For those of you who may have stumbled across this via a web search, this issue is addressed in SQL SP3.

http://support.microsoft.com/default.aspx?scid=kb;en-us;316331

DTSTransferObjects with Events will not work in VB for all previous SQL Service Packs

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Re: error from an EXE app. using WithEvents with DTS.Pacakage2 rocio
9/2/2003 10:03:26 AM
Thanks for the reply, but this is not my case.
Let me explain better.
I implement all 5 events for the DTS.Package object I'm using.
To alert the user while the program is running and send to him reports of
the same, I added a form with a listview to display all the steps of the DTS
package while they execute. If I run this program from within VB6, it runs
fine. It is the EXE file I created for this program the one that crashes.

I decied to remove the listview and display the messages in a simple
listbox.....now the EXE file does not crash.
I decided to put a progress bar, but now the EXE file crashes.

But, none of these versions crash when run from within VB6.

Thanks!


AddThis Social Bookmark Button