GrantPublicationAccess Method (SQL-DMO)

The GrantPublicationAccess method the specified login to the publication access list.

Applies To
MergePublication Object TransPublication Object

Syntax

object.GrantPublicationAccess( szLoginName )

Parts
Part Description
object Expression that evaluates to an object in the Applies To list
szLoginName String identifying an existing the Microsoft® SQL Server™ login by name

Remarks

Granting privilege to a login by using the GrantPublicationAccess method of the MergePublication or TransPublication object requires appropriate privilege. The SQL Server login used for SQLServer object connection must be a member of the system-defined role db_owner in the published database, or a role with greater privilege.

Prototype (C/C++)

HRESULT GrantPublicationAccess(SQLDMO_LPCSTR szLoginName);


(c) 1988-98 Microsoft Corporation. All Rights Reserved.