无法在ssis中每天动态获取日期

时间:2013-05-24 10:11:34

标签: sql ssis

我创建了SSIS以从sql生成excel文件 并根据今天的日期动态提供文件名。

由于测试,我还没有部署包。

当我更改系统日期以测试时,它能够创建该日期的文件 但它给了我一个跟随错误

Error at Data Flow Task [Excel Destination [34]]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
Error at Data Flow Task [Excel Destination [34]]: Opening a rowset failed. Check that the object exists in the database.
Error at Data Flow Task [SSIS.Pipeline]: "component "Excel Destination" (34)" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task : There were errors during task validation.
 (Microsoft.DataTransformationServices.VsIntegration)

excel connection manager我已在property excelfilepath中设置expression 代码是@[User::ExcelFileName] + (DT_WSTR, 20) (DT_DBDATE) GETDATE()+".xls"

给出评估值,如C:\2013-05-24.xls

我如何解决它。

1 个答案:

答案 0 :(得分:0)

解决此问题。在Excel连接管理器属性中,您必须将“ DelayValidation ”属性设置为 TRUE