Friday, February 24, 2012

DTS: Strange error when calling a sub-package.

(SQL Server 2000, SP3a)
Hello all!
I've been wrestling with a bear of a problem with my DTS Package. It has a sub-package
(several of them, actually), and when I run the package in the DTS "designer" (from
Enterprise Manager) or DTSRUN.exe, everything works splendidly!
I have since made a VBScript "driver" program that is using the COM interface to DTS, and
when I execute the package, it fails with the following error:
Execution was canceled by user.
This error occurs just before calling the sub-package (which is invoked with the "Execute
Package Task"), but the previous two tasks (Dynamic Properties and ActiveX Tasks) are
successful before that Execute Package Task fails with the above error.
I've been pulling my hair out all day trying to figure out what's causing this.
If anyone can help shed some light on this issue, I'd be *hugely* obliged! Thanks in
advance!
John PetersonSet all your tasks to execute on the main thread.
Are you using Events ?
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eJTre0QTEHA.2716@.tk2msftngp13.phx.gbl...
> (SQL Server 2000, SP3a)
> Hello all!
> I've been wrestling with a bear of a problem with my DTS Package. It has
a sub-package
> (several of them, actually), and when I run the package in the DTS
"designer" (from
> Enterprise Manager) or DTSRUN.exe, everything works splendidly!
> I have since made a VBScript "driver" program that is using the COM
interface to DTS, and
> when I execute the package, it fails with the following error:
> Execution was canceled by user.
> This error occurs just before calling the sub-package (which is invoked
with the "Execute
> Package Task"), but the previous two tasks (Dynamic Properties and ActiveX
Tasks) are
> successful before that Execute Package Task fails with the above error.
> I've been pulling my hair out all day trying to figure out what's causing
this.
> If anyone can help shed some light on this issue, I'd be *hugely* obliged!
Thanks in
> advance!
> John Peterson
>|||Hey Allan!
Yeah...all my tasks were executing on the Main thread. I'm not sure what you mean by
"using Events"?
I did stumble across this issue:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319058
But I don't know how to handle events in VBScript. My guess is that I can't. :-(
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:OrnlCDTTEHA.3944@.TK2MSFTNGP12.phx.gbl...
> Set all your tasks to execute on the main thread.
> Are you using Events ?
> --
> --
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:eJTre0QTEHA.2716@.tk2msftngp13.phx.gbl...
> > (SQL Server 2000, SP3a)
> >
> > Hello all!
> >
> > I've been wrestling with a bear of a problem with my DTS Package. It has
> a sub-package
> > (several of them, actually), and when I run the package in the DTS
> "designer" (from
> > Enterprise Manager) or DTSRUN.exe, everything works splendidly!
> >
> > I have since made a VBScript "driver" program that is using the COM
> interface to DTS, and
> > when I execute the package, it fails with the following error:
> >
> > Execution was canceled by user.
> >
> > This error occurs just before calling the sub-package (which is invoked
> with the "Execute
> > Package Task"), but the previous two tasks (Dynamic Properties and ActiveX
> Tasks) are
> > successful before that Execute Package Task fails with the above error.
> >
> > I've been pulling my hair out all day trying to figure out what's causing
> this.
> >
> > If anyone can help shed some light on this issue, I'd be *hugely* obliged!
> Thanks in
> > advance!
> >
> > John Peterson
> >
> >
>|||Well...I got to the heart of my problem, and it can be best explained by this MS KB
article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319058
I had someone help me write a quick-n-dirty .NET C# wrapper for the DTS package, and when
we put in the event handler for OnQueryCancel, sure enough, this bug reared its ugly head.
:-(
It's unfortunate, because I had some measure of work invested in my VBScript application,
but because I can't write an event handler in VBScript, I cannot rectify this situation in
that environment.
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eE%23GgsVTEHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hey Allan!
> Yeah...all my tasks were executing on the Main thread. I'm not sure what you mean by
> "using Events"?
> I did stumble across this issue:
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;319058
>
> But I don't know how to handle events in VBScript. My guess is that I can't. :-(
>
> "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> news:OrnlCDTTEHA.3944@.TK2MSFTNGP12.phx.gbl...
> > Set all your tasks to execute on the main thread.
> >
> > Are you using Events ?
> >
> > --
> >
> > --
> >
> > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > www.SQLDTS.com - The site for all your DTS needs.
> > I support PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:eJTre0QTEHA.2716@.tk2msftngp13.phx.gbl...
> > > (SQL Server 2000, SP3a)
> > >
> > > Hello all!
> > >
> > > I've been wrestling with a bear of a problem with my DTS Package. It has
> > a sub-package
> > > (several of them, actually), and when I run the package in the DTS
> > "designer" (from
> > > Enterprise Manager) or DTSRUN.exe, everything works splendidly!
> > >
> > > I have since made a VBScript "driver" program that is using the COM
> > interface to DTS, and
> > > when I execute the package, it fails with the following error:
> > >
> > > Execution was canceled by user.
> > >
> > > This error occurs just before calling the sub-package (which is invoked
> > with the "Execute
> > > Package Task"), but the previous two tasks (Dynamic Properties and ActiveX
> > Tasks) are
> > > successful before that Execute Package Task fails with the above error.
> > >
> > > I've been pulling my hair out all day trying to figure out what's causing
> > this.
> > >
> > > If anyone can help shed some light on this issue, I'd be *hugely* obliged!
> > Thanks in
> > > advance!
> > >
> > > John Peterson
> > >
> > >
> >
> >
>

No comments:

Post a Comment