次の方法で共有


IsObjectDeleted Method

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

The IsObjectDeleted method indicates whether the referenced object has been deleted from the database.

構文

object
.IsObjectDeleted( 
ObjectType
, 
ObjectName
, 
[
ObjectOwner
]
) 
as Boolean

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • ObjectType
    Long integer that indicates the object type as specified in settings.
  • ObjectName
    String that specifies the object name.
  • ObjectOwner
    Optional string that specifies the object owner.

Prototype (C/C++)

HRESULT IsObjectDeleted)(
SQLDMO_OBJECT_TYPE ObjectType, 
SQLDMO_LPCSTR ObjName, 
LPBOOL pRetVal, 
SQLDMO_LPCSTR ObjOwner);

Settings

Specify the value of the ObjectType argument using these SQLDMO_OBJECT_TYPE values.

Constant Value Description

SQLDMOObj_Check

49152

Object references an integrity constraint.

SQLDMOObj_Column

24576

Object references a column in a table.

SQLDMOObj_Database

135168

Object references a database.

SQLDMOObj_DatabaseRole

225280

Object references a database role.

SQLDMOObj_Default

64

Object references a default.

SQLDMOObj_Rule

128

Object references a rule.

SQLDMOObj_StoredProcedure

16

Object references a stored procedure.

SQLDMOObj_SystemDatatype

4096

Object references a SQL Server base data type.

SQLDMOObj_SystemTable

2

Object references a system table.

SQLDMOObj_Trigger

256

Object references a trigger.

SQLDMOObj_User

8192

Object references a SQL Server database user.

SQLDMOObj_UserDefinedDatatype

4096

Object references a SQL Server user-defined data type.

SQLDMOObj_UserDefinedFunction

1

Object references a user-defined function.

SQLDMOObj_UserTable

8

Object references a SQL Server user-defined table.

SQLDMOObj_View

4

Object references a view.

解説

If a client session creates an object using SQL Distributed Management Objects (SQL-DMO), and another client session subsequently deletes the object using another tool, the SQL-DMO application is unaware of the deletion. A SQL-DMO application can use the IsObjectDeleted method to determine if the object still exists by specifying the object type and object name. If the objectOwner parameter is not used, the application assumes that the object owner is the user currently logged in.

ms141850.note(ja-jp,SQL.90).gifメモ :
The IsObjectDeleted method can be used with SQL Server 7.0, and Microsoft SQL Server 2000 or later.

Applies To:

Database2 Object

参照

関連項目

IsDeleted Property

ヘルプおよび情報

SQL Server 2005 の参考資料の入手