Logon

The Logon function takes the URL of the server and the credential elements required by IBM® Cognos® to perform a logon: user ID, password, and namespace. The namespace parameter is case-sensitive; therefore, you must match the namespace exactly.

Syntax

IBM Cognos Office stores user credentials only in memory. For this reason, users are responsible for storing their credentials in a secured area and passing them to the logon methods at run time.

If you use the Logon function with incorrect credentials, the system raises a CAMException error, however, no exception is written to the log file indicating a failure. To avoid this situation, remember that strings are case-sensitive and ensure that you use valid user IDs, passwords, and namespaces.

Logon does not appear in the macro list in the Microsoft application because the macro receives an argument. Any macro with parameters is by definition private and private macros are not shown in the macro options by default.

Boolean Logon (url, user name, password, namespace)

Parameters

Table 1. Arguments for Logon
Argument Description Data type

url

The URL for the IBM Cognos server to which you want to log on

String

user name

The user name for authentication

String

password

The password for authentication

String

namespace

The specific namespace for authentication

String

Return value

Data type: Boolean

The Boolean value that is true if successful

Example

Here is an example of this syntax:

Dim bResult As Boolean
bResult = CognosOfficeAutomationObject.Logon
("http://localhost/ibmcognos/bi/v1/disp",
"Administrator", "CognosAdmin", "Production")