dbTalk Databases Forums  

DTS and C# interoperability

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


Discuss DTS and C# interoperability in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wagner Silveira
 
Posts: n/a

Default DTS and C# interoperability - 09-15-2003 , 06:56 PM






Hi guys.

I'm trying to integrate DTS and C# in the following way:

- I have a C# interface that calls the DTS package, manage
its global variables and runs it, managing events.

My problem is that inside the DTS package a need to call
another C# program to process some data using xml and
after that keep processing the DTS package. So far it's
working fine, but the C# interface code and the xml
process code are in different executables, and the DTS
package triggers it using an Execute Proccess task - what
means that it has to pump in another window and everything.

So, finally, my question is: there's any way for me to
call code from the C# interface program without have to
break my package in two?

Tks in advance for any help.

Cheers, Wagner.

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

Default Re: DTS and C# interoperability - 09-16-2003 , 01:56 PM






In article <05b801c37be4$f9a62100$a401280a (AT) phx (DOT) gbl>, Wagner Silveira
<wagner.silveira (AT) clineguide (DOT) com> writes
Quote:
Hi guys.

I'm trying to integrate DTS and C# in the following way:

- I have a C# interface that calls the DTS package, manage
its global variables and runs it, managing events.

My problem is that inside the DTS package a need to call
another C# program to process some data using xml and
after that keep processing the DTS package. So far it's
working fine, but the C# interface code and the xml
process code are in different executables, and the DTS
package triggers it using an Execute Proccess task - what
means that it has to pump in another window and everything.

So, finally, my question is: there's any way for me to
call code from the C# interface program without have to
break my package in two?

Tks in advance for any help.

Cheers, Wagner.
You have two different processes, the DTS "manager" program and a second
program that does something with XML. You cannot merge the two and
expect one to be external of DTS and the other integrated.

If the manager needs to pass data to the XML program then you need to go
through global variables. You can use the global variables to change the
execute process task's command line, thus passing in that data.

Maybe it would be better to change the XML app into a DTS custom task to
provide better DTS integration.

Sorry, but I am still unclear of the exact nature of your problem, so
this may not help.

Cheers
--
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   
Wagner Silveira
 
Posts: n/a

Default Re: DTS and C# interoperability - 09-16-2003 , 04:31 PM




Quote:
-----Original Message-----
You have two different processes, the DTS "manager"
program and a second
program that does something with XML. You cannot merge
the two and
expect one to be external of DTS and the other integrated.

If the manager needs to pass data to the XML program then
you need to go
through global variables. You can use the global
variables to change the
execute process task's command line, thus passing in that
data.

Maybe it would be better to change the XML app into a DTS
custom task to
provide better DTS integration.

Sorry, but I am still unclear of the exact nature of your
problem, so
this may not help.

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

I have really two programs. One of them manages the call
of a DTS package, while the other one process some XML
data picked up from the database. My problem here is that
the XML program is called from inside the DTS package. The
workflow is more or less like this:

1. DTS manager instantiates a DTS package using the DTS
COM interface.
2. DTS package starts and the manager is monitoring its
behaviour (giving the user information of what task is
running, that kind of things).
2. One of the DTS package tasks (an Execute Process task)
starts the XML program.
3. After XML program finishes the DTS package resumes its
other tasks and finishes.

What I thinking (but I have the feeling that is not
possible) is:

1. DTS manager instantiates a DTS package using the DTS
COM interface.
2. DTS package starts with the manager monitoring its
behaviour.
2. One of the DTS package tasks invokes a method of the
DTS manager that wraps the same functionality of the XML
program.
3. After the method finishes the DTS package resumes its
other tasks and finishes.

I hope that I could make it easier to understand. Have
in mind that there's not wrong happening in the first
scenario. I just want to have only one interface running
and managing everything without have to break my package
in two (everything that runs before the XML program in one
place and everything that runs after the XML program in
another place).

Thanks in advance for your help Darren.


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

Default Re: DTS and C# interoperability - 09-17-2003 , 12:09 PM



In article <066901c37c99$f3a01120$a101280a (AT) phx (DOT) gbl>, Wagner Silveira
<wagner.silveira (AT) clineguide (DOT) com> writes
Quote:
-----Original Message-----
You have two different processes, the DTS "manager"
program and a second
program that does something with XML. You cannot merge
the two and
expect one to be external of DTS and the other integrated.

If the manager needs to pass data to the XML program then
you need to go
through global variables. You can use the global
variables to change the
execute process task's command line, thus passing in that
data.

Maybe it would be better to change the XML app into a DTS
custom task to
provide better DTS integration.

Sorry, but I am still unclear of the exact nature of your
problem, so
this may not help.

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

Hi Darren.

I have really two programs. One of them manages the call
of a DTS package, while the other one process some XML
data picked up from the database. My problem here is that
the XML program is called from inside the DTS package. The
workflow is more or less like this:

1. DTS manager instantiates a DTS package using the DTS
COM interface.
2. DTS package starts and the manager is monitoring its
behaviour (giving the user information of what task is
running, that kind of things).
2. One of the DTS package tasks (an Execute Process task)
starts the XML program.
3. After XML program finishes the DTS package resumes its
other tasks and finishes.

What I thinking (but I have the feeling that is not
possible) is:

1. DTS manager instantiates a DTS package using the DTS
COM interface.
2. DTS package starts with the manager monitoring its
behaviour.
2. One of the DTS package tasks invokes a method of the
DTS manager that wraps the same functionality of the XML
program.
3. After the method finishes the DTS package resumes its
other tasks and finishes.

I hope that I could make it easier to understand. Have
in mind that there's not wrong happening in the first
scenario. I just want to have only one interface running
and managing everything without have to break my package
in two (everything that runs before the XML program in one
place and everything that runs after the XML program in
another place).

Thanks in advance for your help Darren.
There isn't any way to call back to the hosting app. If you just want to
loose the console window popping up the change your xml program into a
COM Dll not an exe. You could take this one step further and implement
the customtask interface which will enable you to interact with the
package more, such as raising events.

--
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
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.