views:

319

answers:

1

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

+1  A: 

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.

Irwin M. Fletcher
Thank You Irwin.But I am bit clueless here as I am not executing the package through command lines instead invoking it through the Execute method of the Package class. Is there a way to force the class to run in 32bit environment.Or do I have to rewrite the code to execute the package using command line ?. But this is something that I am trying to avoid as its hard to get information about package progress. I will have to depend on SSIS Logging for this.Any help?Thanks
Masood Ahmad
I believe when making connections to providers that only support 32 bit connections that you have no choice but to use the command line utility and retrieve your data from the logs. See this link for additional information. http://msdn.microsoft.com/en-us/library/ms141766.aspx
Irwin M. Fletcher