dbTalk Databases Forums  

Execute Package Task fails if called from VB

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Execute Package Task fails if called from VB in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
chambersdon@hotmail.com
 
Posts: n/a

Default Execute Package Task fails if called from VB - 02-25-2005 , 04:46 PM






I have a VB.NET application that needs to execute a DTS package.

This package includes an 'Execute Package Task' as one of its steps. I
cannot get the 'Execute Package Task' step to run.

My package runs fine if I take out this package.
Both packages run fine if run separately.
The packages run fine if I move the functionality from the included
package into the main package.

The error the log reports is that the user has canceled the execution
of the sub package.

My code is very simple:
(serverName and dtsPackageName are variable passed to this function)

Dim p As New DTS.Package2Class
p.LoadFromSQLServer(serverName, , ,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
dtsPackageName)
p.Execute()

Thanks for any help,
Don


Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Execute Package Task fails if called from VB - 02-26-2005 , 03:07 AM






In message <1109371606.808932.200290 (AT) l41g2000cwc (DOT) googlegroups.com>,
chambersdon (AT) hotmail (DOT) com writes
Quote:
I have a VB.NET application that needs to execute a DTS package.

This package includes an 'Execute Package Task' as one of its steps. I
cannot get the 'Execute Package Task' step to run.

My package runs fine if I take out this package.
Both packages run fine if run separately.
The packages run fine if I move the functionality from the included
package into the main package.

The error the log reports is that the user has canceled the execution
of the sub package.

My code is very simple:
(serverName and dtsPackageName are variable passed to this function)

Dim p As New DTS.Package2Class
p.LoadFromSQLServer(serverName, , ,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
dtsPackageName)
p.Execute()

Thanks for any help,
Don

Set the Exec Pkg Task to execute on main thread. Right-click the task
and select Workflow Properties, see the Options tab.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
Don
 
Posts: n/a

Default Re: Execute Package Task fails if called from VB - 02-26-2005 , 12:17 PM



I tried this and I'm still getting the same error.


Reply With Quote
  #4  
Old   
Wayne Snyder
 
Posts: n/a

Default Re: Execute Package Task fails if called from VB - 02-28-2005 , 01:52 PM



What is the error?

--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org

<chambersdon (AT) hotmail (DOT) com> wrote

Quote:
I have a VB.NET application that needs to execute a DTS package.

This package includes an 'Execute Package Task' as one of its steps. I
cannot get the 'Execute Package Task' step to run.

My package runs fine if I take out this package.
Both packages run fine if run separately.
The packages run fine if I move the functionality from the included
package into the main package.

The error the log reports is that the user has canceled the execution
of the sub package.

My code is very simple:
(serverName and dtsPackageName are variable passed to this function)

Dim p As New DTS.Package2Class
p.LoadFromSQLServer(serverName, , ,
DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrus tedConnection, , , ,
dtsPackageName)
p.Execute()

Thanks for any help,
Don




Reply With Quote
  #5  
Old   
Don
 
Posts: n/a

Default Re: Execute Package Task fails if called from VB - 03-01-2005 , 02:47 PM



The error message is below.

This package works fine if run from enterprise manage but throws the
error when VB.NET executes it. I have selected 'execute on main
package thread' but it still fails.
The package task moves data from SQL Server to Oracle and then kicks of
an Oracle stored procedure using an Execute SQL task. The first step
that of the sub package that moves data from SQL Server to Oracle works
then I get the error.

Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:Execution was canceled by user. Step Error code:
80040427 Step Error Help File:sqldts80.hlp Step Error Help Context
ID:10100


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.