GetSQLDMOObject Method (SQL-NS)

The GetSQLDMOObject method retrieves the SQL-DMO object associated with this item.

Applies To
SQLNamespace Object  

Syntax

object.GetSQLDMOObject(
ItemIn)

Part Description
object Expression that evaluates to an object in the Applies To list
ItemIn Handle to the item in the namespace hierarchy

Remarks

Not all items have associated SQL-DMO objects. If you want strong type checking for the SQL-DMO objects in Microsoft® Visual Basic®, reference the Microsoft SQL-DMO Object Library. To validate that the object type returned is correct, use the TypeOf method that every SQL-DMO object exposes. TypeOf returns a member of the SQLDMO_OBJECT_TYPE enumeration. If no object is associated with the SQLNamespace object, an empty object is returned (Object Is Nothing). In C++, use the IID_IV* (OLE Automation (VB/VBA) Dual Interfaces) instead of the IID_IW* - C++ Unicode interfaces, because the GetSQLDMOObject method returns an IDispatch pointer. Only the SQL-DMO SQLServer and Database objects are returned.

Data Type

Object

Prototype (C/C++)

HRESULT GetSQLDMOObject(
HSQLNSITEM ItemIn,
IDispatch **pRetVal);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.