ServerPassword Property

DTS Programming

DTS Programming

ServerPassword Property

The ServerPassword property sets or returns the login password for the instance of Microsoft® SQL Server™ that contains the Data Transformation Services (DTS) package to be run by an ExecutePackageTask object.

Applies To
ExecutePackageTask Object
Syntax

object.ServerPassword [= password]

Part Description
object Expression that evaluates to an ExecutePackageTask object
password Login password for the instance of SQL Server that contains the DTS package to be run

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT ServerPassword(BSTR* pRetVal);

HRESULT ServerPassword(BSTR pRetVal);

Remarks

The ServerPassword and ServerUserName properties must be provided unless UseTrustedConnection is TRUE or the DTS package is contained in a storage file.

Note  It is recommended that you connect to an instance of SQL Server using Windows Authentication instead of SQL Server Authentication. To use Windows Authentication, set UseTrustedConnection to TRUE.

This property also can be referenced through the Properties collection of the Task object with the following code:

Set taskprops = task.Properties
taskprops("ServerPassword") [= password]

See Also

ServerName Property

ServerUserName Property

UseTrustedConnection Property