SSIS 对象模型 - 64 位计算机上的 Excel 连接管理器错误

发布于 2024-08-16 19:43:47 字数 791 浏览 1 评论 0原文

我有一个 SSIS 包,它读取 Excel 文件(数据流源)并使用 OLEDB 目标数据流项将数据传输到 SQL Server。该包由 .Net 应用程序使用 SSIS 对象模型执行。该包存储在文件系统中的应用程序子文件夹中。

该软件包在我的开发/测试机器上运行良好。这两台机器都有 win2k3 32 位。 SSIS 是在 BIDS 32 位环境中构建的。

当我在具有 win2k3 x64 标准版的生产计算机上部署此应用程序时,我收到错误

发生了 OLE DB 错误。错误代码:0x80040154。 OLE DB 记录可用。来源:“Microsoft OLE DB 服务组件” Hresult:0x80040154 描述:“类未注册”。 对连接管理器“Excel 连接管理器”的 AcquireConnection 方法调用失败,错误代码为 0xC0202009。 组件“Excel Source”(630) 验证失败并返回错误代码 0xC020801C。

我在其他帖子中读到,设置项目的 Run64BitRuntime 属性(在设计时)可以解决从 BIDS 运行它时的问题。

我如何通过 SSIS 对象模型设置此属性。

这是执行包的代码部分

   _application = New Application()
   _package = New Package()
   _package = _application.LoadPackage(packageName, Nothing)
   _updateResult = _package.Execute()

谢谢

Masood

I have a SSIS package which reads an Excel File (Data Flow Source) and transfer the data to SQL Server using OLEDB Destination Data Flow Item.This package is executed by .Net Application using the SSIS Object model. The package stored in a file system within the application subfolder.

The package works fine on my development/test machine both.Both these machine has win2k3 32bit. The SSIS was build in BIDS 32bit Environment.

When I deploye this application on production machine which has win2k3 x64 standard edition i get the error

An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".
The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.
component "Excel Source" (630) failed validation and returned error code 0xC020801C.

I have read in other posts that setting the Run64BitRuntime property of the project(during design time) solves the problem when running it from the BIDS.

How do i set this property through SSIS object model.

Here is the part of the code that executes the package

   _application = New Application()
   _package = New Package()
   _package = _application.LoadPackage(packageName, Nothing)
   _updateResult = _package.Execute()

Thanks

Masood

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等数载,海棠开 2024-08-23 19:43:47

Run64BitRuntime 属性仅适用于 BIDS 内部打包运行。在 BIDS 之外运行时无需设置此属性。

我相信您的问题是,在代码中运行时,包以 64 位模式执行,但是 Excel 不支持这一点。为了完成这项工作,您需要启动 DTExec 的 32 位版本。

The Run64BitRuntime property only applies to the packaged running inside of BIDS. There is no need to set this property when running outside of BIDS.

I believe that you issue is that when running in code, the package is executing in 64 bit mode, however, Excel does not support this. In order to make this work you will need to shell out to launch the 32-bit version of DTExec.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文