NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

SQLConnection.Password

Gets or sets the password to use when connecting.

[Visual Basic]
Public Property Password As String
[C#]
public string Password {get; set;}
[C++]
public: __property String* get_Password();
public: __property void set_Password(String*);
[JScript]
public function get Password() : String;
public function set Password(String);

Property Value

The password to use when connecting. The default value is an empty string.

Exceptions

Exception Type Condition
BrokenConError The connection is broken.
OpenConVariable The connection is open. You must first close the connection.

Remarks

The Password property overwrites the cooresponding property within the connection string.

Note   This property is read-only while the connection is open.

Example

The following example creates a SQLConnection and sets some of its properties.

See Also

SQLConnection Class | SQLConnection Members | System.Data.SQL Namespace | ConnectionString | ConnectionTimeout | Database | DataSource | UserID | IsolationLevel