PublishDatasource Method

The PublishDatasource method publishes the datasource connection for a PowerCube.

Syntax

Cube .PublishDatasource(overwrite)

Applies To

Cube Object

Discussion

Use this method to publish a datasource connection on the IBM® Cognos® server.

A Windows, or UNIX or Linux® location from where the IBM Cognos server accesses each cube must be specified. If user authentication is enabled, the configured namespace must also be specified. Returns true if successful.

A COM exception is thrown in error situations. The message that is passed with the exception varies depending on the error situation.

Parameter

Description

overwrite

Required. If true, republishes the datasource if it already exists.

Type: Boolean

Return Type

Boolean (True if publish is successful)

Examples

cube = model.Cubes.Item("National")cube.PublishDatasource(True)
'Republish PowerCube if it already exists