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.
[!참고]
The IsObjectDeleted method can be used with SQL Server 7.0, and Microsoft SQL Server 2000 or later.