Excel连接管理器的EzApi问题

Excel连接管理器的EzApi问题,excel,reflection,ssis,window,ezapi,Excel,Reflection,Ssis,Window,Ezapi,EzApi用于创建SSIS包,当我在读取excel文件的数据流之后创建EzExecSQLTask对象时,包通过oledb连接管理器(microsoft.ace.oledb.12.0)读取excel文件 我遇到异常:对象与目标类型不匹配 调试后,我在第行下面找到的EzApi代码正在生成异常 host.Properties[“TimeOut”].SetValue(主机,值) 当通过反射设置属性时,似乎找不到目标对象 这段代码在widows xp机器上运行良好,但在windows Server 201

EzApi用于创建SSIS包,当我在读取excel文件的数据流之后创建EzExecSQLTask对象时,包通过oledb连接管理器(microsoft.ace.oledb.12.0)读取excel文件

我遇到异常:
对象与目标类型不匹配

调试后,我在第行下面找到的EzApi代码正在生成异常

host.Properties[“TimeOut”].SetValue(主机,值)

当通过反射设置属性时,似乎找不到目标对象

这段代码在widows xp机器上运行良好,但在windows Server 2012上是它导致了问题

堆栈跟踪

at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.ManagedPropertyHelper.SetPropertyValue(Object o, Int32 index, Object value)
   at Microsoft.SqlServer.Dts.Runtime.DtsProperty.SetValue(Object o, Object value)
   at Microsoft.SqlServer.SSIS.EzAPI.EzExecSqlTask.set_TimeOut(UInt32 value) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\EzExecutables.cs:line 751
   at Microsoft.SqlServer.SSIS.EzAPI.EzExecSqlTask.InitializeTask() in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\EzExecutables.cs:line 740
   at Microsoft.SqlServer.SSIS.EzAPI.EzExecSqlTask..ctor(EzContainer parent) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\EzExecutables.cs:line 732
   at Microsoft.SqlServer.SSIS.EzAPI.Common.ComponentWrapper.CreateSQLTaskWithExpression(EzContainer p, String name, String sql, EzConnectionManager cm) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\Common\ComponentWrapper.cs:line 55
   at Microsoft.SqlServer.SSIS.EzAPI.SSI_Wrapper.SSIPackage.LogMessage(String stepID, String stepName, String userID, String statusID, String message, String sqlTaskName, EzExecutable attachToComp, EzConnectionManager cm) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\SSI Wrapper\SSIPackage.cs:line 723
   at Microsoft.SqlServer.SSIS.EzAPI.SSI_Wrapper.SSIPackage.CreatePackage(Int64 userID, Nullable`1 sourceID, Int64 taskID, Boolean isSystemTask, StepDTO step, List`1 execStatus) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\SSI Wrapper\SSIPackage.cs:line 178
   at Optime.ISS.ETL.WebAPI.SSISPackageController.ExecuteTask(TaskDTO task) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.WebAPI\SSISPackageController.cs:line 77
更多信息

仅当microsoft.ace.oledb.12.0用于连接excel文件时,windows server 2012上才出现此问题。同样的代码在WindowsXP和microsoft.ace.oledb.12.0 32位驱动程序中运行良好

请帮忙。。。。我们可以再往前走

请推荐合适的论坛