views:

1230

answers:

2

I am trying to programatically create an SSIS package containing a simple data flow from table A to table B in the same database. I am using the example given here. The package gets created and saved to a dtsx file, but when I open it in visual studio I see that the source and destination tables have not been selected.

I also want to insert a transformation task in between before it reaches the destination. Any clues, pointers?

Thanks.


EDIT

Well I have managed to get the source and destination tables selected and the task even ran successfully. Turns out I needed to

(a) use one oleDB connection each for the source and detination [I dont like this way; I want to use one connection only]

(b) set the Accessmode to 3 in the destination SetComponentProperty("AccessMode", 3) which equates to Table or View - fast load.

Is there some documentation on this somewhere. All I can find is what SetComponentProperty does, and not what all parameters it can take to do that. eg. what else can I put there besides "AccessMode"?, what does the second parameter 3 or 2 or 1 stand for?

Still trying to map the monikers. STOCK:PipelineTask means DataFlow Task. What is the moniker for say... copy column?

A: 

I used to have a copy of SQL Server 2005 Integration Services, a Wrox book. I am pretty sure it has a whole chapter or two dedicated to programmatically working with SSIS packages. You may want to check out a local book store and flip through it, it may have what you want.

Sorry I can't give you anything more specific than a book reference. Good luck.

vfilby
I would also look at Kirk Haselden's SSIS book - it is more programmer-oriented.
Michael
Thanks, will give this a try too.
+1  A: 

Yes, this is one of my frustrations with SSIS: that they do not provide simple table or map of the new terminology.

You can use a small piece of code to discover components available for use.

The code is located here: http://msdn.microsoft.com/en-us/library/ms136106.aspx

When I ran it, I found the moniker for copy column to be: Name: Copy Column CreationName: DTSTransform.CopyMap.1

Maitus
thanks. now comes the part on how to use it :))

related questions