473,320 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

executing DTS packages in C#

How do you execute a DTS package from C#? I have some code that doesn't
work because the structured storage file cannot be found :

[MTAThread]
static void Main(string[] args)
{
// TODO: Add code to start application here
Package2Class package = new Package2Class();

object pVarPersistStgOfHost = null;

//loadfromsqlserver
package.LoadFromStorageFile(
"c:\\TransferTxtFileToTable.dts",
null,
null,
null,
"Test Package",
ref pVarPersistStgOfHost);

package.Execute();
package.UnInitialize();

package = null;
}

Has anybody else had this problem, and does anybody know how to solve
it? Any help would be really appreciated.
Cheers,

Mike
*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
2 6801
null out the name of the package, as below, or correct the name by specifying
the name you named the package when you saved it.

//sample with nulled out package name
package.LoadFromStorageFile(
"c:\\TransferTxtFileToTable.dts",
null,
null,
null,
null,
ref pVarPersistStgOfHost);

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Mike P" wrote:
How do you execute a DTS package from C#? I have some code that doesn't
work because the structured storage file cannot be found :

[MTAThread]
static void Main(string[] args)
{
// TODO: Add code to start application here
Package2Class package = new Package2Class();

object pVarPersistStgOfHost = null;

//loadfromsqlserver
package.LoadFromStorageFile(
"c:\\TransferTxtFileToTable.dts",
null,
null,
null,
"Test Package",
ref pVarPersistStgOfHost);

package.Execute();
package.UnInitialize();

package = null;
}

Has anybody else had this problem, and does anybody know how to solve
it? Any help would be really appreciated.
Cheers,

Mike
*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2
Hi Dear Mike P,

see these links.

Using DTS from C#
http://www.c-sharpcorner.com/Code/2002/Sept/DTSnCS.asp
HOW TO: Handle Data Transformation Services Package Events in Visual C#
.NET
http://support.microsoft.com/?id=319985

UI architecture for managing DTS packages
By Narayana Rao Surapaneni, krmpradeep
DTS Follow-up, Web Services, Access Over the Network, and More
http://msdn.microsoft.com/msdnmag/issues/04/01/WebQA/

Bye
Venkat_KL
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nick Coghlan | last post by:
Anyone playing with the CPython interpreter's new command line switch might have noticed that it only works with top-level modules (i.e. scripts that are directly on sys.path). If the script is...
15
by: Nick Coghlan | last post by:
Python 2.4's -m command line switch only works for modules directly on sys.path. Trying to use it with modules inside packages will fail with a "Module not found" error. This PEP aims to fix that...
1
by: Jagannathan Santhanam | last post by:
Hello We ran into a peculiar problem. We copied all of our DTS packages from one server to another server (both of which run SQL 2000 and are on the same Service Pack 3/3a). When we execute an...
13
by: BK | last post by:
Can someone point me to a code sample that illustrates executing long running tasks (asynchronous) from a web application in ASP.NET? I assume that Web Services might come into play at some point,...
1
by: Al-Pacino | last post by:
Hello All, I am am having a strange problem. I am trying to execute a DTS package from VB .NET (.aspx) page. The DTS package takes 21 minutes to execute. When the aspx page sends a command to...
3
by: moxie | last post by:
I am trying to rsh from a server that does not have python installed to a server that has python but I get error message rsh python-server "/usr/local/bin/python /home/s/src/utpython/UnitTrip.py"...
0
by: giovanni gherdovich | last post by:
Hello, first of all: Is this the right place to ask plastek-related questions? I'm trying to make plastex work on my Ubuntu Dapper Drake. For LaTeX, I have the all-in-one package tetex.
2
by: psbasha | last post by:
Hi , I am getting the following error in ActiveState ActivePython2.4,when executing the UI which I worked in Python2.4.2 downloaded from www.Python.org ...
2
by: ed_baxter | last post by:
We've noticed NULLID.SYSSH200 has been executing on the mainframe like 500K times a minute. What is this thing and what would make it run so often? It is causing our SMF history to be useless.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.