In article <3421947.1066079478 (AT) dbforums (DOT) com>, mjones
<member43970 (AT) dbforums (DOT) com> writes
Quote:
Is there a way to generate the exception file under the Option tab in
the DTS task dynamically? I want to generate a different exception file
every time I run the same pacakge. The file name can be anything as
long
as it's different. |
You could use the Dynamic Properties Task or more likely an ActiveX
Script Task to set the ExceptionFileName Property of the DataPump task.
Something like this-
Option Explicit
Function Main()
Dim oPkg, oDataPump
Dim sFilename
' Derive the new file name
sFilename = "something date based perhaps or fancy temp file"
' Get reference to the DataPump Task
Set oPkg = DTSGlobalVariables.Parent
Set oDataPump =
oPkg.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask
' Set the filename
oDataPump.ExceptionFileName = sFilename
' Clean Up
Set oDataPump = Nothing
Set oPkg = Nothing
Main = DTSTaskExecResult_Success
End Function
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org