original:
http://blog.9cbs.net/menliwxj/
Some time to do a decision-making system project, I used Microsoft's AS, I checked a lot of information, but there was no Chinese, I had to translate myself (because my English is rotten, so I translated it). Reference for friends needed.
DSO Decision Branch System Programmer Reference
Overview
Microsoft SQL Server 2000 Analysis Services provides you with real opportunities to create and integrate custom applications. The server object model DSO provides interfaces and objects that can be used through COM automation programs such as VB5.0 and subsequent versions. In addition, VC programmers can also use DSO, and DSO objects simultaneously support early or delayed binding.
The programmer refers to the details of DSO to develop custom applications for developing and analyzing server interactions. For more information on other program tools using AS, see "Write an AS Application" section.
The subject matter of this section covers the following:
Subject Description Interfaces For details on each interface of the DSO object you program, including the collection, method and properties of interface management. Events (Event) DSO objects supported by events, including database reports and object processing events. Objects information about DSO objects. The subject's topic is provided by the default interfaces they have, and also includes collection, methods and properties of a particular object. ENUMERATIONS (Enumeration) Details provided by DSOs with information on how to use their information Collections DSO, including common methods and properties that apply these collections.
interface
There is a multi-interface in DSO. The object has a common interface with similar functions. Take a few examples: databases, cubes, partitions, and aggregation implementation of MDStore interfaces. The MDStore object is a multidish data container. The database contains the relationship information of the cube, and the multi-dimensional data set contains partitions of the stored data, and the aggregation is a summary of the pre-calculated associated data in the partition. The MDStore object has a similar structure. They contain dimensions sets of classified data, specifying the data source of the relational data management system, including accidents and dimensional rules, and the like.
Give a reference to the MDStore interface or other DSO interface, you can determine which type of object is to be determined by testing the ClassType property. Objects that implement the MDStore interface can be the following types: ClsDatabase, Clscube, Clspartition and ClsAggation. Through this reference, DSO objects are identified with the prefix symbol "CLS". The DSO class type enumeration includes a complete list of all DSO class types.
Not all objects use the same way to implement public interface, some objects do not implement all interface properties, methods and collections. For example, a database object (ClsDatabase) implements the Begintrans method of the MDStore public interface, but the cubic object (CLSCube) is not implemented. Some object restrictions handle some attributes to be an example in which he becomes read-only attribute, not readable / written. If you try to handle an unforgettable attribute or call a method that is not implemented, the DSO will throw an error.
DSO exposes Command, Dimension, Level, MDStore, Measure, and Role Universal Interface. The following table lists the DSO universal interface and the type of object that implements them.
Interface Description Immation The COMMAND Command Interface Exposes Definitions and Management The function of performing the MDX statement on the client and the CLSDatabaseCommand ClscubeCommand ClsDatabaseCommand ClscubeCommand ClsDatabaseCommand Dimension interface defines the properties, methods and collections, you can use to operate different types of dimensions: Database Sail, Multi-dimensional data set, partition dimension, and polymerization dimensions. clsCubeDimension clsPartitionDimension clsAggregationDimension Level Level Interface defines an object for object hierarchy clsDatabaseLevel clsCubeLevel clsPartitionLevel clsAggregationLevel Ming Wei degrees MDStore implemented MDStore interface contains the following dimensions: a database cube partition achieve Measure interface polymerization clsDatabase clsCube clsPartition clsAggregation Measure object described Stored in a cube, partition, and a value in the polymerization. ClscubeMeasure ClspartitionMeasure ClsAggregationMeasure Role Realizes the object of the Role interface contains databases, cubes, and processing permissions for data mining models CLSDatabaseerole Clscuberole ClsdataBaseRole Clscuberole ClsMiningModelrole Some DSO objects do not implement universal interfaces. You can use the default interfaces of these objects: Clsserver, ClsDataSource, ClsminingModel, ClsColumn, ClscubeAnalyzer, ClsPartitionAnalyzer, with CLSMEMBerProperty.
Remarks:
The DSO class library has exposed many object classes, such as Cube, Database, Partition, Cubedimension, and more. These objects are kept in the future and intend to use in the DSO application. You should use a general interface instead. For example, use the following code to create a class type of CLSDatabase (a database object implements the MDStore interface):
'Assume an Object (DSOSOSERVER) of classType Clsserver EXISTS.
'Add Database Object To Server's MDStores Collection.
DIM DSODB AS MDStore
'Declare the object by the interface.
Set dsoDB = dsoServer.mdstores.addnew ("mydb")
A universal interface that often uses the appropriate object. For example, the main object types use the MDStore interface as their dedicated interface. The following code example shows the private interface using the Cube object:
'Incorrect - do not use.
Private dsocube as dso.cube
'Correct
Private DSocube as dso.mdstore
The only exception of this rule is the Database object. If your client application needs to capture database events, many interfaces of the object apply MDStore instead, as shown in the following code:
'Use this statement if you do not need to TRAP Events.
Public dsodb as dso.mdstore
'Use this statement if you need to trap events.
Public Withemts DSODB As DSO.DatabaseCommand Interface
In DSO, some objects can include a set of user-defined commands to automate the data perspective service client when you process objects. These commands can include an expression representative of MDX, such as defining a computing member, a nameset, a library resource, and other commands.
The security prompt command may be a secure vulnerability; they can call the system or user-defined functions without requiring user knowledge or intervention, and includes secure licenses stored in simple text. On the pre-implementation of these commands, review the command text of the security issue.
Immand interface objects, CubeCommand, DBCommand, with Rolecommand, attribute ClassType has its own value CLSCubeCommand, ClsDatabaseCommand, CLSRoLethMand. The Command interface provides a collection, method and properties to operate these objects.
Application to:
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
set:
The Command interface contains the following collections:
Collection Description CustomProperties Command Objects User Custom Attributes
method:
The COMMAND interface contains the following methods:
Method Description Clone copies an existing object to the same type of target object. LockObject locks an object UNLOCKOBJECT Unlock a previously locked object Update Save the Command object definition to the metadata knowledge base.
Attributes:
Command interface supports the following properties:
Property Description ClassType Returns an enumeration constant identifies a particular class type. CommandType returns an enumeration constant that identifies command use. Description setting or returns a description of the command object. Isvalid pointed out if Name and Statement property are empty, whether the command object belongs to a collection name setting or returns a command object Name ORDINALPOSITION Return to the command object In the Commands collection of the parent object MDStore, the index number Parent to return the parent object MDStore Reference ParentObject Return to the current object Reference statement setting or return command text subclassType for the parent object of the child object SubclasStype Returns the enumeration constant of the subclass type of the identifier object
CLSCubeCommand
Class Types of CLSCubeCommand provide special DSO Command interface implementation. This object provides a collection and attribute through the Command interface, but there is no relevant method.
Remarks:
When the multidimensional data set contains commands to be processed, the class type of CLSCubeCommand automatically performs the MSSQL2000 AS compressed command. You add commands to cubes by adding a command to the COMMANDS collection of cubes, including computing members, named, class reference, and others.
For more information, please refer to "DSO Introduction"
example
Create a class type of CLSCubeCommand. Implement with the following code:
'Assume an Object (DSOSOSERVER) of classType Clsserver EXISTS
'with existing database and cube
DIM DSODB As DSO.MDSTORE
'Database
Dim dsocube as dso.mdstore
'Cube
DIM DSOCMD As DSO.Command
'Command
SET DSODB = dsoServer.mdstores (1)
SET DSOCUBE = DSODB.MDSTORES (1) SET DSOCMD = dsocube.commands.addnew ("cubecmd1")
CLSDatabaseCommand
The class type provides a special implementation for the object of CLSDatabaseCommand to the DSO Command interface. This object provides a collection, method and attributes through the Command interface.
Note
When the database contains commands, the MSSQL 2000 AS client automatically performs the user-defined user-defined user-defined user-defined user custom commands. You can add a command to the database by adding a command to the database's Commands collection. These commands include calculation members, names, class references, and more.
example
'Assume an Object (DSOSOSERVER) of classType Clsserver EXISTS
'With an existing database
DIM DSODB As DSO.MDSTORE
'Database
DIM DSOCMD As DSO.Command
'Command
SET DSODB = dsoServer.mdstores (1)
SET DSOCMD = dsoDb.commands.addnew ("dbcmd1")
CLSRoLethMand
Class types provide special implementation for the object of CLSRoLethCommand for the Command interface. These objects provide collection and attributes through the Command interface, but there is no implementation of the relevant method.
Note
When the database contains commands, the MSSQL 2000 AS client automatically performs the user-defined user-defined user-defined commands that type CLSRoLethMand. You can add commands to the rules by adding commands to the rule's Commands collection. These commands include calculation members, names, class references, and more.
For example, you may want to authorize a computing member to manage rules in Salesbonus members, but don't want to give SalesPerson rules. Maintaining the command of the Salesbonus calculation member is automatically executed when processing a cube containing this rule command.
example
Use the following code to create a type of CLSRoLethCommand:
'Assume an Object (DSODB) of classType ClsDatabase EXISTS
Dim dsorole as dso.role
'Role
DIM DSOCMD As DSO.Command
'Command
Set dsorole = dsodb.roles (1)
SET DSOCMD = dsorole.commands.addnew ("rolermd1")
Collection CustomProperties
CustomProperties collection is applied to all DSO objects, allowing you to define unique properties for DSO objects. The CustomProperties collection contains the properties object that you define the information associated with the DSO object. To learn more about defining custom properties, see the "Property Object" section.
Authority
Read / write
Note
The CustomProperties collection implements its own methods and properties, which is very different from the operations of other DSO collections.
example
The following code example shows the addition and retrieval-to-custom property object:
'Assume The Existence of an Object of ClassType Clsdimension.
'Add a ready.
DIM DSOPROP As DSo.property
Set dsoProp = dsodim.customproperties.add (55, "age", vbinteger)
'Retrieve Custom Property Values.
DIM DSOPROP2 As DSO.Property
Set dsoprop2 = dsodim.customproperties (1)
Debug.print dsoprop2.name, dsoprop2.value
Method Clone
The clone command of the Command interface is copied to the properties of an existing object to the same type of target object. Target objects must presence in advance already use Clone methods.
Use
CLSDatabaseCommand
grammar
Object.clone (ByVal TargetObject As Command, [Byval Options as CloneOptions = Clonemajorchildren])
Object: copy object
TargetObject: Pre-created objects of the same type
Options: For objects with CLSDatabaseCommand, CloneOptions do not have an impact and is ignored.
example
The following example shows how to copy a command object:
'Assumeth A Command Object (DSOCMD) EXISTS.
DIM DSOCMDCopy As New DSO.COMMAND
DSOCMD.CLONE DSOCMDCOPY
Method LOCKOBJECT
The LockObject method of the Command interface locks the object to prevent multiple users from changing the object at the same time.
Use
CLSDatabaseCommand
grammar
Object.lockObject (Byval LockType As OlaplockTypes, Byval Lockdescription as String)
Object to be locked
One of the lock types in the LockType OlaplockType enumeration.
The enumeration value of the LockType parameter of the OLAPLOCKTYPE LOCKOBJECT method is implemented in the DSO class library.
Constant describes OlaplockextendedRead Other applications to read objects, but they cannot change or process. This lock is used to prevent objects depend on by the object are being processed, such as shared dimensions of the cube, and OlaplockextendedRead multi-user locks can be applied to multiple user applications. However, no application can lock the object being processed or updated until all OLAPLockextendedRead locks are released. The Process method of the OLAPLOCKPROCESS object can be started, and other applications can only read objects until the lock is released. At the same time, an object can only have an OLAPLOCKPROCESS lock, and other applications can only apply OLAPLOCKREAD locks after the OLAPLOCKPROCESS lock is enabled. OLAPLOCKREAD can be read from the knowledge base before the lock is not released, and cannot be changed by other applications. When applying OLAPLOCKREAD locks, other applications can apply OLAPLOCKREAD, OLAPLOCKEXTENDEAD, and OLAPLOCKPROCESS locks, but cannot lock with OlaplockWrite. The properties of the OLAPLOCKWRITE object can be used to modify the knowledge base with an UPDATE method. Before the lock is un released, the reference to which to have programs will be invalid, without other types of locks can be applied to the object.
Method UNLOCKOBJECT
The UNLOCKOBJECT method for the Command interface releases the lock previously added by the LockObject method.
Use
CLSDatabaseCommand
grammar
Object.unlockObject
Object: Object to unlock
Note
If one or more locked created by the application is terminated before released with UNLOCKOBJECT methods, the AS will automatically release these locks when the application is off.
example
The following example is to display a COMMAND object to facilitate modify it, then unlock the knowledge base information that updates its knowledge. 'Assumeth A Command Object (DSOCMD) EXISTS.
DSOCMD.LOCKOBECT OLAPLOCKREAD, "Updating Command, please wait."
(Insert Code to Change Command Object Here.)
DSOCMD.UPDATEDSOCMD.UNLOCKOBJECT
Method Update
The UPDATE method for the Command interface saves the definition of a command object to the metadata knowledge base.
Use
CLSDatabaseCommand
grammar
Object.Update
Object: To update the command object
Note
Use this method when you want to save the modifications made to the object. Any change will allow the object to have a session until this method is executed.
example
The following example shows the locking of a command object to facilitate modification, then unlock and make its knowledge base information.
'Assumeth A Command Object (DSOCMD) EXISTS.
DSOCMD.LOCKOBECT OLAPLOCKREAD, "Updating Command, please wait."
(Insert Code to Change Command Object Here)
DSOCMD.UPDATEDSOCMD.UNLOCKOBJECT
Attribute classType
The CLASSTYPE attribute of the Command interface contains a name that is often used to identify the names in the DSO object model.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type CLASSTYPES
Access read only
example
Use the following code to return a class type of a command object, and which type of object is returned:
'Assume an Object (DSOCommand) of classType ClsCommand exists.
DIM ENUCLASSTYPE As DSO.CLASSTYPES
ENUCLASSTYPE = DSOCOMMAND.CLASSTYPE
SELECT CASE ENUCLASSTYPE
Case ClsDatabaseCommand
'INSERT CODE for a Database Command.
Case ClscubeCommand
'INSERT CODE for a Cube Command.
Case CLSRoLECOMMAND
'INSERT CODE for A Role Command
Case Else
'INSERT CODE for WHEN this is not a command object.
End SELECT
Attribute CommandType
The CommandType property of the Command interface contains an enumeration to identify command options.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data Type CommandTypes
Access permission reading / writing
Note
CommandType's value test AS explains the command object. The following table lists the possible values:
CommandType Description cmdcreateAction command includes a creation activity syntax. The cmdcreatemember command defines one or more calculation member cmdcreateset commands to define a set cmduSelibrary command for one or more existing members Specify a third-party DLL that contains a function registered in MDX. The cmdunknown command defines a syntax that does not include any other command type, just like the Drop member syntax or syntax that will be added in the future version Note that this command type is only used when there is no other command type syntax, cmdcreatecellcalculation command command A computing unit declaration is defined. Important is to ensure compatibility with AS, you should only create an activity, calculate member, named set, or computing unit definition for each command.
example
A. Specify a command type
Use the code below to specify a command type for an existing command object:
CommandObject.commandtype = cmdcreateMember
B. Test command type
Use the following code to test the type of command:
DIM CommandType as dso.commandtypes
CommandType = CommandObject.commandtype
SELECT CASE COMMANDTYPE
Case cmdcreateAction
'INSERT CODE TO CREATE An Action.
Case cMdcreateMember
'INSERT Code to Define a Calculated MEMBER.
Case CMSCREATESET
'INSERT CODE to Define a named set of existing minutes.
Case cmduselibrary
'INSERT CODE TO USE A Third-Party Library.
Case CMDCREATECALCALCALCALCALCALCALCLATION
'INSERT CODE TO CREATE A CALCULATED CELLS DEFINITION.
Case cmit
'INSERT Code to Define Other Statements.
End SELECT
Property Description
The Description property of the Command interface contains a description of the command object.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type String
Access reading / writing
Note
The main mechanism for identifying the command object is the Name property. The intent of using the Description attribute is to provide additional description information.
example
'Assumeth A Command Object (DSOCMD) EXISTS.
DSOCMD.DESCRIPTION = "CREATE A New Profit Member As Sales-Cost."
Property isvalid
The isvalId property of the Command interface indicates whether Name and Statement are empty and whether the command object has always belongs to a collection.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type Boolean
Access read only
Note
Because of the flexible species of the command object, only the following check will execute:
l Command object Name attribute is not empty
l Command objects have always belong to a Commands collection
l Command object's Statement property is not empty
The execution command is a way that the unique test command function is correct.
example
'Assumeth A Command Object (DSOCMD) EXISTS.
If DSOCMD.ISValid The'insert Code To Save The Command.
Else
'Return an error with one or more property.
END IF
Attribute Name
The NAME property of the command interface contains the name of the command object. This attribute is the main mechanism of identifying the individual of the command object.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type String
Access read / write (the object is named after being named)
Note
In a cube, each command must have a unique name. For more information on the name agreement of DSO, see "DSO Naming Convention" section.
example
'Assumeth A Command Object (DSOCMD) EXISTS.
Debug.print dsocmd.name
Property OrdinalPosition
The OrdinalPosition property of the Command interface contains the index number in the command set of the command in the parent object MDStore.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data Type INTEGER
Access read only
Note
The location index number test command sets the order in which the command is executed. This index number is very important when a command relying on other commands (for example: create set commands using the CREATE MEMBER command defined). This reason is based on this reason, should have a lower ORDianLPosition property value than the Create set command. However, the execution sequence location of the command does not affect the order of the calculation unit defined by the calculation unit or command. See "Understanding the Sequence and Solution Orders" for more information.
example
The following code shows the creation of three new commands in the command set of the Foodmart 2000 database. Then list the collection content, print the OrdinalPosition and the NAME property to the debug window. Next, the code example deletes and rebuild the first command, and then list the order of the ordinal Position changes to the other commands again.
Dim DSOSERVER AS New DSO.SERVER
DIM DSODB As DSO.MDSTORE
DIM DSOCMD As DSO.Command
'Connect to the Local Analysis Server.
DSOSERVER.CONNECT "Localhost"
'Open the foodmart 2000 database.
SET DSODB = DSOSERVER.MDSTORES ("Foodmart 2000")
'Add three seedpless.
SET DSOCMD = dsodb.commands.addnew ("Command3")
SET DSOCMD = dsodb.commands.addnew ("Command1")
SET DSOCMD = dsodb.commands.addnew ("Command2")
'Iterate Through The Commands for the DataBase.
For Each DSOCMD in dsoDb.commands
'Print its name and ordinal position
Debug.print dsocmd.ordinalPosition & "=" & dsocmd.name
NEXT
'Now, Delete the Command3 Command and Add It Again.
DSODB.COMMANDS.Remmands.remove "Command3" set dsocmd = dsoDb.commands.addnew ("Command3")
'Iterate Again Through The Commands for the Database.
Debug.print "-----"
For Each DSOCMD in dsoDb.commands
'Print its name and ordinal position
Debug.print dsocmd.ordinalPosition & "=" & dsocmd.name
NEXT
Property Parent
The Parent attribute of the Command interface includes the reference of the parent object MDStore.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type MDStore
Access read only
Note
The class of the parent object relies on the class of the command object.
Special If the command object has a CLASSTYPE attribute to CLSRoLECOMMAND and if the data mining model rule is related, this property returns Nothing. The data mining model does not implement the MDStore interface, so this property cannot be used.
Command Object Class Parent Object Class CLSDatabaseCommand Clsdatabase ClscubeComand Clscube CLSRoLCommand Clscube ClsDatabase
example
The following example shows the MDStore collection that creates a cubic command and assigns it to the first cube of the Foodmart2000 database, and then print some of the properties of the parent object through the Parent property of the cubic command object.
Dim DSOSERVER AS New DSO.SERVER
DIM DSODB As DSO.MDSTORE
Dim dsocube as dso.mdstore
Dim dsodbcmd as dso.command
Dim dsocubecmd as dso.command
'Connect To The Analysis Server.
DSOSERVER.CONNECT "Localhost"
'Get a reference to the foodmart 2000 database.
SET DSODB = DSOSERVER.MDSTORES ("Foodmart 2000")
'Get The First Cube in The Database's Collection.
SET DSOCUBE = dsodb.mdstores (1)
Debug.print "cube.name =" & dsocube.name
'Add the command to the cube's collection.
SET DSOCUBECMD = dsocube.commands.addnew ("tempcommand")
Debug.print "cube.commands (" tempcommand "). Name =" _
& DSocube.commands ("TempCommand"). Name
'Print The Properties of the Command's
'Parent Object.
Debug.print ".parent Properties" & VBCRLF & _
"-----------"
Debug.print "TypenAme (DSocubecmd.Parent) =" & _typeName (dsoCubecmd.Parent)
IF dsocubecmd.parent.classtype = clscube the
Debug.print ".classtype = clscube"
Else
Debug.print "this Line Should Never Be Executed."
END IF
Debug.print ".description =" & dsocubecmd.parent.description
Debug.print ".name =" & dsocubecmd.parent.name
DSocube.commands.remove ("TempCommand")
Property ParentObject
The ParentObject property returns a delay binding reference to the default interface to the parent object.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type OBJECT
Access read only
Note
This property returns the default interface of the parent object of the command object. For objects of CLASSTYPE attribute values, this property returns classType to CLSCuberole or ClsDatabaseerole object. The behavior of this property is different from the Parent attribute. The Parent property returns the closest MDStore parent reference, which may be a direct parent reference to rely on the classType of the command object. This property returns the parent reference of the command object regardless of the interface. This behavior difference is obvious when you use ClassType for the command object of CLSRoLethMand.
Class Type Parent Object Interface Parent Object Class Type CLSDatabaseCommand Mdstore Clsdatabase ClscubeCommand Mdstore Clscube ClsRolecommand Role Clsdatabaseerole Clscuberole ClsdataBaserole Clscuberole ClsdataBaserole Clscuberole Clsdata
example
Compare Parent and ParentObject properties
The following example compares the use of the Parent and the ParentObject property.
Dim DSOSERVER AS New DSO.SERVER
DIM DSODB As DSO.MDSTORE
Dim dsorole as dso.role
Dim dsorolecMD as dso.command
Dim DSODATABASEROLE AS DSO.ROLE
DSOSERVER.CONNECT "Localhost"
SET DSODB = DSOSERVER.MDSTORES ("Foodmart 2000")
'Get the first role in the database.
'This stay be the every.
Set dsorole = dsodb.roles (1)
Debug.print "Databaseerole.name =" & dsorole.name
'Add a new command to the role.
Set dsorolecMD = dsorole.commands.addnew ("rolermd")
'Print The Properties of The Parent Object.
Debug.print ".parent property" & vbcrlf & "--------" Debug.print "interface type =" & Typename (dsorolecMD.Parent)
IF dsorolecmd.parent.classtype = clsdatabase the
Debug.print ".classtype = clsdatabase"
Else
Debug.print "this kind never beprinted."
END IF
Debug.print ".description =" & dsorolecMD.Parent.description
Debug.print ".name =" & dsorolecmd.parent.name
'Print The Properties of the ParentObject Object
Debug.print ".parentObject Properties" & Vbcrlf & "---------"
Debug.print "Interface Type =" & TypeName (dsorolecmd.parentObject)
Set dsodatabaseerole = dsorolecMD.ParentObject
IF dsodatabaseerole.classtype = clsdatabaseerole damaserole
Debug.print ".classtype = clsdatabaseerole"
Else
Debug.print "this kind never beprinted."
END IF
Debug.print ".classtype =" & dsodatabaseerole.classtype
Debug.print ".description =" & dsodatabaseerole.description
Debug.print ".name =" & dsodatabaseerole.name
Property Statement
The Statement property of the Command interface contains the command syntax text.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data type String
Access reading / writing
Note
For more information on the command statement, see the Command Type.
The name used in the statement such as defining activities, calculating members, named sets, and computing units must be unique in cubes. For example, if you create an activity and name Test, you will not create a computing unit definition is also named Test.
example
A. Create a command object (cmdcreateAction)
Use the following code to create a command object for a cmdcreateAction type:
CommandObject.Statement = "Create Action Sales.ShowCustDetails" & _
"For [Customer] MEMBERS AS" & _
"'Iif (Customers.currentMember.properties (" "EXInship Customer" "" & _
"=" True "," & _ "" "http://myserver/customerdetails.asp? Custom =" "& _
"Customers.currentMember.ID, '')" & _
"Type = URL" & _
Application = 'IE' "& _
"Description = 'launch the customer details page for" "
"this specific Customer. '"
You can use CurrentCube in the command statement to indicate the cube that contains the command object. This reserved word makes it easy to copy command objects between cubes. For example, you can override the previous code like the code below:
CommandObject.Statement = "Create Action Currentcube.ShowCustDetails" & _
"For [Customer] MEMBERS AS" & _
"'Iif (Customers.currentMember.properties (" "EXInship Customer" "" & _
"=" True "," & _
"" "http://myserver/customerdetails.asp? custom =" "& _
"Customers.currentMember.ID, '')" & _
"Type = URL" & _
Application = 'IE' "& _
"Description = 'Open the customer details page for" ""
"this specific Customer. '"
B. Create a command object (cmdcreateMember)
CommandObject.Statement = "Create Measure Sales.MeasureS.profit AS" & _
"'MeasureS.Sales - MeasureS.cost'"
C. Create a command object (cmdcreateset)
CommandObject.Statement = "CREATE SET CURRENTCUBE. [IMPORTEDBEER] AS" & _
'Filter (Product.members, "& _
(INSTR (1, Product.currentMember.Name, "Imported Beer" ")))" "
D. Create a command object (cmduselibrary)
CommandObject.Statement = _
"Use library" "c: /sampledirectory/mystatfunctions.dll" ""
E. Create a command object (cmdcreatecellcalculation) CommandObject.Statement = Create Session Cell Calculation "& _
"[Sales]. [Mexico Adjustments] for" & _
"(Descendants ([Mexico], [City], Self)) '&_
"AS '
"Condition = '[Time] .currentmember.name = [2000]'"
F. Returns a command object statement.
DIM STRCOMMANDSTATEMENT AS STRING
STRCOMMANDSTATEMENT = CommandObject.Statement
Property SUBCLASTYPE
The SubClassType of the Command interface contains a subclass type that is often used to identify the object. Objects that implement the Command interface typically have a SubClassType or SBClsRegular property.
Use
CLSCubeCommand
CLSDatabaseCommand
CLSRoLethMand
Data Type SubclasStypes
Access read only
MDSTORE interface
The MDSTORE interface implements the DSO object containing multidimensional data, which contains these objects:
Object Description Database indicates the object of the database in the analytics server. The database contains cubic, dimensions, mining models and rule CUBE represents a cubic object in the analytical server. The cube contains dimensions, summarizes, and command partition represents objects of physical storage methods in cubes. Partition contains dimensions, summarizes the objects of the collection data table in the cube. Contains dimensions, summarizing the members attribute
Through interfaces implemented by these objects, the MDSTORE interface is used to use the main interfaces of these objects. To distinguish an object that implements the MDStore interface, you can use the classType property. The following table lists the objects that implement the MDStore interface and the values related to the ClassType property:
Object classType Value Database ClsDatabase Cube Clscube Partition CLSPARTITION AGGREGATION CLSAGGREGATION