• ObjectProperty only works in the context of the current database. It has no parameters to know to look in other databases, just an objectID as the first parameter.

    From Books Online:

    id

    Is an expression that represents the ID of the object in the current database. id is int and is assumed to be a schema-scoped object in the current database context.

    Edit: Corrected.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass