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.
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 |
String
Read/write
HRESULT ServerPassword(BSTR* pRetVal);
HRESULT ServerPassword(BSTR pRetVal);
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]