The FileName property sets or returns the name and path of the file that contains a Data Transformation Services (DTS) package to be run by an Execute Package Task object.
object.FileName [= filespec]
Part | Description |
---|---|
object | Expression that evaluates to an ExecutePackageTask object |
filespec | Name and path of the file that contains the package |
String
Read/write
HRESULT GetFileName(BSTR* pRetVal);
HRESULT SetFileName(BSTR pRetVal);
If the FileName property is empty, the ExecutePackageTask object looks in Microsoft® SQL Server™ 2000 Meta Data Services or in the SQL Server msdb database (depending on the setting of the UseRepository property) on the specified server to find the package to be run.
This property also can be referenced through the Properties collection of the Task object with the following code:
Set taskprops = task.Properties
taskprops("FileName") [= filespec]
The following example assigns a file specification to the FileName property:
objCustTask.FileName = "C:\DTS_UE\TestPkg\WriteFileTest.dts"