EnumLocks List

SQLServer.Database Object

Description

Lists the locks held by a SQL Server process. List is returned in a QueryResults object.

Visual Basic

QueryResults = Database.EnumLocks ( [[Who :=] lProcess] )

C++

HRESULT pDatabase->EnumLocks (
LPSQLOLEQUERYRESULTS*
ppQueryResults,
long
lProcess = -1 );

Elements

Element Type Description

QueryResults QueryResults Returned QueryResults object
lProcess Long SQL Server process

QueryResults

ColumnName ColumnType

spid SQLOLE_DTypeInt2
locktype SQLOLE_DTypeChar
tablename SQLOLE_DTypeChar
page SQLOLE_DTypeInt4
dbname SQLOLE_DTypeChar