DeleteMDCAccessInfo Method

Deletes security access information for a local PowerCube from memory.

Draft comment:
c8 topic - drop for s7

Syntax

Application.DeleteMDCAccessInfo(MDCName)

Applies To

Application Object

Discussion

Use this method to remove the access information records for a local PowerCube stored in memory by the SetMDCAccessInfo method.

To delete all access information records from memory, use the DeleteAllMDCAccessInfo method.

This method can be used to prevent unauthorized users from opening subsequent reports based on the local PowerCube after all desired reports are open. A good situation to use this method is AfterDocOpen macro for the last report to be opened.

Parameter

Description

MDCName

Required. Specifies the MDC (cube) name of a local PowerCube. This string must match the name that was used in the SetMDCAccessInfo Method. The name is not case sensitive.

Type: String

Return Type

Boolean

Example

This example sets the cube security access information record and then opens a report based on the password protected cube. Next, the security access record is deleted from memory.

Sub Main()
     Dim objPPApp As Object
     Dim objPPRep As Object
     Dim strMDCName As String
     Set objPPRep = CreateObject("CognosPowerPlay.Report")
     Set objPPApp = objPPRep.Application
     strMDCName = "C:\Cubes and Reports\Sample1.mdc"
     objPPApp.SetMDCAccessInfo strMDCName, ", "cube_password"
     objPPRep.Open "C:\Cubes and Reports\Sample1.ppx"
     objPPApp.DeleteMDCAccessInfo(strMDCName)
     Set objPPRep = Nothing
     Set objPPApp
End Sub

Related Topics