Groups | Blog | Home
all groups > sql server dts > march 2006 >

sql server dts : Events from task UI causing hang


Tony Proctor
3/13/2006 12:20:19 PM
Hi! I hope someone might be able to help me with this...

I have a couple of VB6 DTS Tasks that use the same VB UserControl. The
Control source code is part of those DTS projects rather than being a
separate OCX. The Control raises an event when either of 2 ComboBoxes are
changed. However, ever since this Public Event was added to the Control, the
DTS Task has been incurring some odd errors

Basically, changing the Properties of the DTS Task works lovely (the UI
appears and there are no errors), except after the Package has been
Executed. Then, any attempt to revisit the Task Properties results in:

"Failed to activate control 'VB.UserControl'. This control may be
incompatible with your application. Make sure that you are using the version
of the control that was provided with your application."

I don't believe this is a coding issue because it still fails if I comment
out the calls to RaiseEvent in that Control. However, if I also comment out
the Public Event declaration then the error doesn't happen any more. This
has all the hallmarks of some DTS issue/restriction that I'm not aware of.

Tony Proctor

Tony Proctor
3/14/2006 1:53:31 PM
OK, definitely looks like a Microsoft bug in the DTS framework. Not only
does the error go away if I remove the RaiseEvent calls, and (important) the
Public Event declaration itself, but I can also make it go away by changing
the way the Form is invoked.

If I invoke the default VB instance each time, e.g.

MyForm.Show vbModal

then it works, but if I create a new instance each time, e.g.

Dim oForm As MyForm
Set oForm = New MyForm
oForm.Show vbModal

then it fails.

Looks like one for the archives!

Tony Proctor

[quoted text, click to view]

AddThis Social Bookmark Button