DSO and SliceValue -
02-06-2004
, 04:13 AM
Hi,
I have an application written in vb6 sp5 (dso 8.0) that update some
properties of some partition
of a cube.
My program works fine (or i think so), and i can set, among other, also the
property SliceValue
(see my code below).
My problem occurs when, after run my program, i open the wizard "edit
partition" of the
analysis manager .
In that wizard (in the second page) i see the old value of the data slice
and not the one i've
set in my program.
Can someone tell my why? Perhaps i've forgot something?
Here is my code (semplified version):
Public Function AllineaDati(OlapServer as DSO.Server, SDb as String, sCube
as String, sPart as String, sDim as String, sLev as String, sNewSlice as
String) As Boolean
Dim locOlapCube As DSO.Cube
Dim locOlapPart As DSO.MDStore
Dim locOlapDim As DSO.Dimension
Dim locOlapLev As DSO.Level
On Error GoTo AllineaDatiError
' Istanzio il cubo da modificare
Set locOlapCube = OlapServer.MDStores(sDb).MDStores(sCube)
' Effettuo un lock sul cubo istanziato
locOlapCube.LockObject olaplockWrite, "TComOlapInspector sta modificando
le partizioni"
' Istanzio la partizione da processare
Set locOlapPart = locOlapCube.MDStores(sPart)
' Istanzio la dimensione da processare
Set locOlapDim = locOlapPart.Dimensions(sDim)
' Istanzio il livello da processare
Set locOlapLev = locOlapDim.Levels(sLev)
' Set del nuovo SliceValue
locOlapLev.SliceValue = sNewSlice
' Update della partizione
locOlapPart.Update
' Tolgo il lock su questo cubo
locOlapCube.UnlockObject
AllineaDati = True
TheEnd:
Exit Function
AllineaDatiError:
AllineaDati = False
locOlapCube.UnlockObject
Resume TheEnd
End Function
Fell free to ask me more info if you need.
Tnks!
Corrado
--------------------------------
Molinatto Corrado
Softwareland S.a.s.
Via Ornavasso, 5
10145 Torino - Italy
mailto: cmoERASEUPPERCASELETTERTOWRITETOME@swlnd(dot)com |