Microsoft KB Archive/259571

= PRB: DTS Connection Password Is Write Only =

Article ID: 259571

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft SQL Server 7.0 Service Pack 2
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q259571



SYMPTOMS
In a logical expression, the comparison of the Data Transformation Services (DTS) Connection Object password will always return false and an empty string will be returned when attempting to display the password. This only occurs after installing Service Pack 2 for SQL Server 7.0.

This behavior is by design.



MORE INFORMATION
The accessibility to the password property for the DTS Connection Object has been changed to write only. This means that, when using the DTS Package Object Library or Active script task, the Connection Object password will not be able to be displayed, read, or used in a logical expression. This will affect packages and code that currently rely on this behavior.

The change was made for security reasons.

The code below demonstrates the behavior of not displaying the password or being able to compare it. Dim oPackage As DTS.Package Dim oConn  As DTS.Connection

Set oPackage = New DTS.Package oPackage.LoadFromSQLServer &quot;Server&quot;, &quot;SA&quot;, &quot;&quot;, DTSSQLStgFlag_Default, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;Test&quot; Set oConn = oPackage.Connections.Item(&quot;Microsoft OLE DB Provider for SQL Server&quot;)

oConn.Password = &quot;Test&quot; Debug.Print oConn.Password     ' Will print nothing If oConn.Password = &quot;Test&quot; Then ' comparison will always return false Debug.Print &quot;Its the same&quot; Else Debug.Print &quot;Its different&quot; End If

Set oConn = Nothing Set oPackage = Nothing

Additional query words: writeonly

Keywords: kbsqlprog kbdatabase kbprb KB259571

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.