IBM Cognos Sample Programs

CMQuery.exe - Query the Content Store and Display the Results.

The C# CMQuery sample program lets you submit search paths to the content store and display the results.


Dependent Files

All associated files are contained in the bin directory of the csharp directory.

How To Run The Sample Program

Launch the command window and navigate to the bin directory in the csharp directory. Type
cmquery.exe -sp [-un -pwd -ns ]
  Where:
    searchPath      is the search path to query. This argument is required.
    userName      is the user ID for logon. (Default is anonymous).
    userPassword      is the password for the userName.
    userNamespace      is the security namespace for userName.

Results are printed to the command-line.

Expected Results

The objects located at the selected path are displayed in the window.

The default options search /* as the Anonymous user.

Documentation

The IBM Cognos Software Development Kit Developer Guide contains additional information about the samples. See the chapter titled 'Methods' and the appendix titled 'Code Samples and Language-Specific Coding Practices'.

Please note that the samples are not intended to be treated as end-user applications. Refer to the sample code for examples of how to use the API when developing your own applications.