Partager via


IsTemporary (MDStore Interface)

ms132817.note(fr-fr,SQL.90).gifRemarque :
  Cette fonctionnalité sera supprimée dans la prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et modifiez dès que possible les applications qui utilisent actuellement cette fonctionnalité.

The IsTemporary property of the MDStore interface indicates whether an object is temporary. Temporary objects are local to the session in which they are created, cannot be saved, and are not available to other users. To create a temporary object, preface the name with the tilde (~) character.

Applies To:clsAggregation, clsCube, clsPartition

Data Type

Boolean

Access

Read-only

Notes

A temporary object is not stored in the repository and is not available to other users. Temporary objects persist only during the session in which they are created unless renamed or cloned to another existing object having the same class type. Objects subordinate to a temporary object, such as levels for a dimension, internally inherit the parent object's IsTemporary setting.

ms132817.note(fr-fr,SQL.90).gifRemarque :
  Only temporary objects can be renamed by changing the Name property. Removing the tilde (~) character from the name of a temporary object means that it is no longer temporary and prevents subsequent renaming of the object. Also, executing the Update method of a temporary object has no effect; the object is not saved to the repository unless the tilde prefix is removed by changing the Name property.

Examples

Creating a Temporary Object

Use the following code to create a temporary dimension object that is renamed and saved to the repository:

'Assume an object (dsoCube) of ClassType clsCube exists.
Dim tmpDim As DSO.Dimension
Set tmpDim = dsoCube.Dimensions.AddNew("~MyDim") 'Temporary
'Add levels, member properties, process, etc.
...
'This is something we want to keep - so drop "~".
tmpDim.Name = "MyDim" 'No longer temporary
tmpCube.Update

Voir aussi

Référence

Dimension Interface
MDStore Interface

Aide et Informations

Assistance sur SQL Server 2005