EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB32939: How to read the Datawarehouse tables prefix using the MicroStrategy Intelligence Server API


Community Admin

• Strategy


The following Visual Basic 6.0 code snippet shows how to read the Warehouse Catalog Tables and display the table prefix if one was set

The following Visual Basic 6.0 code snippet shows how to read the Warehouse Catalog Tables and display the table prefix if one was set.
 

ka04W000000Og9dQAC_0EM440000002GuL.jpeg

 

ka04W000000Og9dQAC_0EM440000002GuJ.jpeg

 
The code uses the Intelligence Server API and has been tested with Strategy 9.0.1
 

ka04W000000Og9dQAC_0EM440000002GuF.png

DB Tables
 
'Allocate a search object...
    Dim objSearch As IDSSSearch
    Set objSearch = objSource.NewObject(DssTypeSearch)
   
    'Set the search criteria...
    'objSearch.NamePattern = txtNamePattern
   
    'objSearch.Types.Add DssTypeReportDefinition
    'objSearch.Types.Add EnumDSSSubTypes.DssTypeDbTable
    objSearch.Types.Add DssTypeDbTable
   
    'Execute the search...
    Dim objSearchFolder As IDSSFolder
    Set objSearchFolder = objSearch.Execute
   
    'Display the number of children...
    lblSearchResults = "Search Results :"
   
    'Clear out the contents of the current list box...
    lstBox.Clear
   
    'Display the contents of the folder...
    Dim objChild As IDSSDBTable
    Dim prefixStr As String
   
    prefixStr = ""
   
    For Each objChild In objSearchFolder
       
        'When prefix is not set the object objChild.TableSource.Prefix does not exist
        'We only want to read the variable if it does exist
        If Not objChild.TableSource Is Nothing Then
            prefixStr = objChild.TableSource.Prefix
        End If
       
        'Output table name / prefix
        lstBox.AddItem objChild.Info.Name & Chr(9) & prefixStr
       
        'Reset prefix string var for next iteration of loop
        prefixStr = ""
    Next objChild
 
 
CUSTOMIZATION WARNING
 
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy consulting assistance.


Comment

0 comments

Details

Knowledge Article

Published:

June 22, 2017

Last Updated:

June 22, 2017