The OrdinalPosition property of the Command interface contains the ordinal position of a command in the Commands collection in the parent MDStore object. Ordinal position determines the order in which commands are executed. This order is important when one command depends on another command (for example, a CREATE SET command that uses a member defined in a CREATE MEMBER command). In this case the CREATE MEMBER command should have a lower OrdinalPosition property value than the CREATE SET command.
| clsCubeCommand | clsDatabaseCommand | 
Integer
Read-only
Use the following code to return a the ordinal position of a command object:
'Assume an object (dsoDB) of ClassType clsDatabase exists
Dim strStatement As String
Dim iCounter As Integer
Dim dsoCmd As DSO.Command
'To check that the first command creates a member 
Set dsoCmd = dsoDB.Commands(1)
For iCounter = 1 To dsoDB.Commands.Count
    Set dsoCmd = dsoDB.Commands(iCounter)
    Select Case dsoCmd.OrdinalPosition
        Case 1
         strStatement = dsoCmd.Statement
         If Left$(strStatement, 13) <> "CREATE MEMBER" Then
          'Error in command
        End If
       Case Else
          'Other validation
    End Select
Next iCounter
| About Decision Support Objects | Using Decision Support Objects | 
| Properties Cross-Reference |