FileName Property

DTS Programming

DTS Programming

FileName Property

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.

Applies To
ExecutePackageTask Object
Syntax

object.FileName [= filespec]

Part Description
object Expression that evaluates to an ExecutePackageTask object
filespec Name and path of the file that contains the package

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetFileName(BSTR* pRetVal);

HRESULT SetFileName(BSTR pRetVal);

Remarks

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]

Example

The following example assigns a file specification to the FileName property:

objCustTask.FileName = "C:\DTS_UE\TestPkg\WriteFileTest.dts"

See Also

PackageName Property

UseRepository Property