从 C# 创建 SQL Server 2008 R2 DTSX - HRESULT 异常:0xC0048021
我正在从 C# (.NET 4.0) 创建 dtsx,但是当我尝试将 OLEDB 源添加到数据流中并且是时候执行 ProvideComponentProperties 步骤时,我在 VS2010 中收到以下错误: HRESULT 异常:0xC0048021
这是我正在使用的代码的一部分:
//add SQL destination
IDTSComponentMetaData100 SQLDestination = dataflowTask.ComponentMetaDataCollection.New();
SQLDestination.ComponentClassID = "DTSAdapter.OleDbSource.1";
// Set the common properties
SQLDestination.Name = "SQLDestination";
SQLDestination.Description = "SQL destination";
CManagedComponentWrapper SQLDestComponent = SQLDestination.Instantiate();
SQLDestComponent.ProvideComponentProperties(); // The error happens here
我正在使用 SQL Server 2008 R2 SP1 和 C# .NET Framework 4.0
I'm creating a dtsx from C# (.NET 4.0) but when I try add the OLEDB Source into the data flow and is time to execute the ProvideComponentProperties step, I recieve the following error in VS2010:
Exception from HRESULT: 0xC0048021
This is part of the code I'm using:
//add SQL destination
IDTSComponentMetaData100 SQLDestination = dataflowTask.ComponentMetaDataCollection.New();
SQLDestination.ComponentClassID = "DTSAdapter.OleDbSource.1";
// Set the common properties
SQLDestination.Name = "SQLDestination";
SQLDestination.Description = "SQL destination";
CManagedComponentWrapper SQLDestComponent = SQLDestination.Instantiate();
SQLDestComponent.ProvideComponentProperties(); // The error happens here
I am using SQL Server 2008 R2 SP1 and C# .NET Framework 4.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SQL2008 R2 仅限于 VS2008 和 .NET 3.5。
You are limited to VS2008 and .NET 3.5 for SQL2008 R2.