C#创建SSIS包的问题

SZ31654270 2006-09-05 10:33:21
请问在C#中如何创建ssis包,要求可以自己选择表,像SQLServer的一样。谢谢~
...全文
113 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
SZ31654270 2006-11-19
  • 打赏
  • 举报
回复
UP~
SZ31654270 2006-09-11
  • 打赏
  • 举报
回复
谢谢关注~但我要做的是创建而不是运行呀 ~
cctaiyang 2006-09-05
  • 打赏
  • 举报
回复
using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.Dts.Samples
{
class CreatingAPackage
{
Package package;
public CreatingAPackage()
{
package = new Package();
}
}
}using System;
using Microsoft.SqlServer.Dts.Runtime;
namespace Microsoft.SqlServer.Dts.Samples
{
class ApplicationTests
{
static void Main(string[] args)
{
// The variable pkg points to the location of the
// ExecuteProcess package sample that was installed with
// the SSIS samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\90\Tools\Samples\1033\DataTransformationServices\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";

Application app = new Application();
Package p = app.LoadPackage(pkg, null);
// Now that the package is loaded, we can query on
// its properties.
int n = p.Configurations.Count;
DtsProperty p2 = p.Properties["VersionGUID"];
DTSProtectionLevel pl = p.ProtectionLevel;

Console.WriteLine("Number of configurations = " + n);
Console.WriteLine("VersionGUID = " + p2);
Console.WriteLine("ProtectionLevel = " + pl);
}
}
}

110,571

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧