SetPassword (Method)

Applies To:

Connection object, MetaDataConnection object

Description:

Sets the password the Interactive Reporting connection file (OCE) uses to connecting to the database.

Syntax:

Expression.SetPassword(Password As String)

Note:

Enclose the password in parentheses. If you do not, the string is created as a variable and you cannot unassign it.

Expression Required:

An expression that returns a Connection object

Example:

This example shows how to set the Password from a password field in a Dashboard section. The name of the password field is TextBox1:

var MyPass = TextBox1.Text
if (Application.Name != "BrioQuery")
ActiveDocument.Sections["Query"].DataModel.Connection.SetPassword(MyPass)