Welcome on Business Intelligence Blog !!!
This blog is dedicated to Business Intelligence technologies under SAS9 and SQL Server 2005.
| Novembre 2009 | ||||||||||
| L | M | M | J | V | S | D | ||||
| 1 | ||||||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||||
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | ||||
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | ||||
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | ||||
| 30 | ||||||||||
|
||||||||||
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using runtime = Microsoft.SqlServer.Dts.Runtime;
using runtimeWrapper = Microsoft.SqlServer.Dts.Runtime.Wrapper;
using wrapper = Microsoft.SqlServer.Dts.Pipeline.Wrapper;
namespace BILAB.Technical.History.PackageBuilder
{
public class MulticastExport
{
private runtime.Package _p;
private runtime.TaskHost _taskhost;
private wrapper.MainPipe _mainpipe;
public void Export()
{
_p = new runtime.Package();
_p.Name = "MulticastExport";
_p.CreatorComputerName = System.Environment.MachineName;
_p.CreatorName = System.Environment.UserName;
this.addDataflow();
this.addSourceCM();
//this.addSourceConnection();
//this.addMulticast();
//this.addPdtSource();
//this.addSort();
//this.addMerge();
//this.addFactDestination();
runtime.Application a = new Microsoft.SqlServer.Dts.Runtime.Application();
a.SaveToXml("ZBILAB.History.dtsx", _p, null);
}
private void addDataflow()
{
/*
* Common properties of taskhost
* ms-help://MS.VSCC.v90/MS.VSIPCC.v90/MS.SQLSVR.v10.en/s10is_1devconc/html/1b725922-ec59-4a47-9d55-e079463058f3.htm
*
* Detail :
* ms-help://MS.VSCC.v90/MS.VSIPCC.v90/MS.SQLSVR.v10.en/s10is_7ismrf/html/e39480e5-613f-4bf4-87b1-249942ed9a35.htm
*/
/* Add Method
* ms-help://MS.VSCC.v90/MS.VSIPCC.v90/MS.SQLSVR.v10.en/s10is_7ismrf/html/a0d4c1cf-d4a3-4297-8892-7b13f235fe9d.htm
*
*/
_taskhost = (runtime.TaskHost)_p.Executables.Add("DTS.Pipeline");
_taskhost.Name = "DFT History";
_mainpipe = (wrapper.MainPipe)_taskhost.InnerObject;
// Another example of taskhost creation
//runtime.Executable e = _p.Executables.Add("Microsoft.SqlServer.Dts.Tasks.BulkInsertTask.BulkInsertTask, Microsoft.SqlServer.BulkInsertTask, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91");
//runtime.TaskHost t = (runtime.TaskHost)e;
//t.Name = "REH";
}