Share via


DBDataPermission.Add(String, String, KeyRestrictionBehavior) 方法

定義

將指定之連接字串 (Connection String) 的存取加入現有的 DBDataPermission 狀態。

public:
 virtual void Add(System::String ^ connectionString, System::String ^ restrictions, System::Data::KeyRestrictionBehavior behavior);
public virtual void Add (string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior);
abstract member Add : string * string * System.Data.KeyRestrictionBehavior -> unit
override this.Add : string * string * System.Data.KeyRestrictionBehavior -> unit
Public Overridable Sub Add (connectionString As String, restrictions As String, behavior As KeyRestrictionBehavior)

參數

connectionString
String

允許的連接字串。

restrictions
String

字串,識別允許或不允許的連接字串參數。

behavior
KeyRestrictionBehavior

其中一個 KeyRestrictionBehavior 屬性。

備註

這個方法在實作時很有用:

  • .NET Framework 數據提供者。

  • 必須判斷提示數據訪問許可權的 API。

  • 必須修改安全策略的系統管理工具或安裝程式。

  • 指定多個規則時,會選取更嚴格的規則。

適用於

另請參閱