Groups | Blog | Home
all groups > sql server dts > february 2005 >

sql server dts : Execute Package Task fails if called from VB



chambersdon NO[at]SPAM hotmail.com
2/25/2005 2:46: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_UseTrustedConnection, , , ,
dtsPackageName)
p.Execute()

Thanks for any help,
Don
Darren Green
2/26/2005 9:07:16 AM
In message <1109371606.808932.200290@l41g2000cwc.googlegroups.com>,
chambersdon@hotmail.com writes
[quoted text, click to view]

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
Don
2/26/2005 10:17:05 AM
I tried this and I'm still getting the same error.
Wayne Snyder
2/28/2005 2:52:29 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

[quoted text, click to view]

Don
3/1/2005 12:47:06 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
AddThis Social Bookmark Button