DBDataPermissionAttribute.KeyRestrictions 属性

定义

获取或设置允许或不允许的连接字符串参数。

public:
 property System::String ^ KeyRestrictions { System::String ^ get(); void set(System::String ^ value); };
public string KeyRestrictions { get; set; }
member this.KeyRestrictions : string with get, set
Public Property KeyRestrictions As String

属性值

允许或不允许的一个和多个连接字符串参数。

注解

连接字符串参数以参数 name>= 的形式<标识。 可指定多个参数,并用分号 (;) 进行分隔。 列出的连接字符串参数可以标识为允许的唯一附加参数或不允许使用 KeyRestrictionBehavior 属性的其他参数。

如果未指定密钥限制,并且 属性 KeyRestrictionBehavior 设置为 AllowOnly,则不允许使用其他连接字符串参数。

如果未指定密钥限制,并且 属性 KeyRestrictionBehavior 设置为 PreventUsage,则允许使用其他连接字符串参数。 如果为同一连接字符串设置了多个规则,则会在权限检查期间选择限制性更高的规则。

适用于

另请参阅