次の方法で共有


ListObjectNames Method

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。 新しい開発作業では、この機能の使用を避け、現在この機能を使用しているアプリケーションは修正するようにしてください。

The ListObjectNames method returns a NameList object that enumerates a specified type of database object involved in the schema and/or data copy operation defined by the Transfer object used.

構文

object.ListObjectNames(ObjectType)asNameList

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • ObjectType
    Long integer that constrains list membership by database object type as described in Settings.

Prototype (C/C++)

HRESULT ListObjectNames(
SQLDMO_OBJECT_TYPE ObjectType,
LPSQLDMONAMELIST* ppList);

Settings

Use the SQLDMO_OBJECT_TYPE values defined below when setting the ObjectType argument. Specify only a single database object type.

Constant

Value

Description

SQLDMOObj_/AllButSystemObjects

5119

Returned SQLObjectList object enumerates all but Microsoft SQL Server system objects.

SQLDMOObj_/AllDatabaseObjects

4607

Returned SQLObjectList object enumerates SQL Server system and user database objects.

SQLDMOObj_/AllDatabaseUserObjects

4605

Returned SQLObjectList object enumerates only user database objects.

SQLDMOObj_Default

64

Returned SQLObjectList object enumerates SQL Server defaults.

SQLDMOObj_Rule

128

Returned SQLObjectList object enumerates SQL Server rules.

SQLDMOObj_StoredProcedure

16

Returned SQLObjectList object enumerates SQL Server stored procedures.

SQLDMOObj_SystemTable

2

Returned SQLObjectList object enumerates SQL Server system tables.

SQLDMOObj_Trigger

256

Returned SQLObjectList object enumerates SQL Server triggers.

SQLDMOObj_/UserDefinedDatatype

4096

Returned SQLObjectList object enumerates SQL Server user-defined data type.

SQLDMOObj_/UserDefinedFunction

1

Returned SQLObjectList object enumerates user-defined function.

SQLDMOObj_UserTable

8

Returned SQLObjectList object enumerates SQL Server user-defined tables.

SQLDMOObj_View

4

Returned SQLObjectList object enumerates SQL Server views.

Returns

A NameList object that enumerates database objects by name.

Applies To: