The proc_GetContainingList stored procedure is invoked to get metadata and event receiver information about the list containing a specified URL.

 PROCEDURE proc_GetContainingList(
       @SiteId                        uniqueidentifier,
       @WebId                         uniqueidentifier,
       @Url                           nvarchar(260),
       @RequestGuid                   uniqueidentifier = NULL OUTPUT

@SiteId: The Site Collection Identifier (section of the site collection containing the list.

@WebId: The Site Identifier (section of the site (2) containing the list.

@Url: The URL in store-relative form of a list item or document within the list. The URL is used to derive the location of the containing list. The leaf name part of this parameter is ignored because it could point to a nonexistent document or list item.

@RequestGuid: The optional request identifier for the current request.

Return Values: This stored procedure returns an integer return code which MUST be listed in the following table.




Successful execution.


The list was found in a different site (2) other than that specified by the @WebId parameter or the site specified by the @WebId parameter was not found.


The list does not exist in the site (2) that was specified by the @WebId parameter.

This stored procedure MUST return one result set if the containing list was not found, and MUST return two result sets if the containing list was found, as defined in the following sections.