CreateObject (clsServer)
Примечание. |
---|
В следующей версии Microsoft SQL Server эта возможность будет удалена. Не используйте ее при работе над новыми приложениями и как можно быстрее измените приложения, в которых она в настоящее время используется. |
The CreateObject method of an object of ClassType clsServer creates and returns an object of the specified ClassType and SubClassType.
Синтаксис
objRet = object.CreateObject(ObjectType As ClassTypes, [SubClassType As SubClassTypes = sbclsRegular])
Параметры
- objRet
A Decision Support Objects (DSO) object of the type to be created.
- objectr
An object of ClassType clsServer.
- ObjectType
The class type of the object to be created. A member of the ClassTypes enumeration.
- SubClassType
Optional. The subclass type of the object to be created. A member of the SubClassTypes enumeration. Default is sbclsRegular.
Замечания
When you are using DSO to construct major objects such as cubes, partitions, dimensions, and so on, use the AddNew method instead. The AddNew method creates an object of the appropriate ClassType in a collection and initializes its Name and Parent properties.
Пример
Use the following code to create an object of type clsCube:
' Assume objServer is a server object and objDB is a database object
Dim objCube as New DSO.MDStore
Set objCube = objServer.CreateObject(clsCube)
objCube.Name = "NewCube"
objDB.MDStores.Add objCube
См. также
Справочник
AddNew (clsCollection)
ClassTypes
clsServer
MDStore Interface
SubClassTypes