Re: DTS Package using c#

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello TheBigJ,

OK So you want to chnage the

DestinationObjectName property of the DataPump task


In an Active Script task I would do this


dim tsk ,

SET tsk = DTSGlobalVariables.Parent.Task("Name").CustomTask

tsk.DestinationObjectName ="XXX"


Have a look at these

http://www.developersdex.com/csharp/message.asp?p=1111&ID=%3C1123265905.362331.210380%40f14g2000cwb.googlegroups.com%3E

And

http://sqldev.net/DTS/dotnetcookbook.htm


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

This is what I need the DTS package to do:
I need to create a temp table, import the contents of a text file, add
some info to the temp table (done with stored procedures) and then add
the contents of the temp table to the permanent table and drop the
temp
table.
I created the DTS package in Enterprise Manager and will be calling it
from a c# program.
In the c# program I set a global variable to be the file name without
the file extension (the file name will be the customer identifier and
is added to the temp table after the text file is imported) The reason
I need to use a temp table is because I may have more then one
instance
of the DTS package running at one time for different customers and
need
to make sure the info does not get crossed.
With the way the DTS package is currently set up, the temp table name
is #tmpGLOBALVARIABLE. I will know the name of the temp table when the
DTS package is called, but do not know how to change the transform
data
task properties to load to the temp table. The temp table has the same
structure as the permanent table, so the transformations will already
be set, I just need to change the destination table in the c# program
before I execute the package.
Any ideas of how I can this, or where I may be able to look to find
information on this?


.



Relevant Pages

  • Re: temp tables in stored procedures called from dts package
    ... dts package because it is created and dumped once the ... Is there some connection property to use to hold open the ... the stored procedure uses a temp table. ...
    (microsoft.public.sqlserver.dts)
  • DTS Package using c#
    ... I need to create a temp table, import the contents of a text file, add ... I created the DTS package in Enterprise Manager and will be calling it ... but do not know how to change the transform data ...
    (microsoft.public.sqlserver.dts)
  • Re: Output Column names in each Row along with the row Value
    ... SELECT 'FirstName', firstName, 'SecondName', secondName, ... 'Occupation' occupation ... especially as I want to do this in a DTS package Export Data which ... insert into #temp values ...
    (comp.databases.ms-sqlserver)
  • temp tables in stored procedures called from dts package
    ... i'm calling a stored procedure to generate a dataset for importation across ... sql servers. ... the stored procedure uses a temp table. ... the dts package, i get an error message "invalid object #temptablename" ...
    (microsoft.public.sqlserver.dts)