Buenas Tardes, Ernesto
...
in este caso debes creer una particion temporanea, come ho dicho en mi mensaje reciente.
Mira por favor el code siguiente(es un ejemplo sin un error handling special, )
Este code no tiene algun warranty y serve como un ejemplo solamente.
'EMPIEZADO EL VB CODE
Private Function UpdateCube(cubeName As String, sourceTable As String, timeColumnName As String, minTime As String, maxTime As String) As Boolean
On Error GoTo UpdateCube_Err
Dim dsoCube As DSO.MDStore
Dim dsoPartition As DSO.MDStore
Dim dsoTmpPartition As DSO.MDStore
Dim filterStr As String
Set dsoCube = dsoDB.MDStores(cubeName)
Set dsoPartition = dsoCube.MDStores(cubeName)
Set dsoTmpPartition = dsoCube.MDStores.AddNew("~TempPartition"
dsoPartition.Clone dsoTmpPartition
filterStr = sourceTable & "." & timeColumnName & " >= '" & minTime & "' AND " & _
sourceTable & "." & timeColumnName & " < '" & maxTime & "'"
dsoTmpPartition.SourceTableFilter = filterStr
dsoTmpPartition.Process processFull
If dsoTmpPartition.EstimatedSize > 0 Then
dsoTmpPartition.SourceTableFilter = ""
dsoPartition.Merge "~tmpPartition"
End If
dsoCube = Nothing
dsoPartition = Nothing
dsoTmpPartition = Nothing
UpdateCube = True
Exit Function
UpdateCube_Err:
'MsgBox ("An error occurred during incremental update of cube " & cubeName & ". number: " & Err.Number & "; description: " & Err.Description & "; Source: " & Err.Source)
Err.Clear
UpdateCube = False
End Function
'TERMINADO EL VB CODE
'----------------
Recuerda que antes de este proceso debes poner atencion sobre algunos casos "paranoicos" como dsoPartition.EstimatedSize debe ser mas de 0 o debes comprovar que en este cubo la particion llamada "~tmpPartition" no existe...
buenas tardes
Issahar Gourfinkel
senior software engineer
Softwatch LTD
Israel