共用方式為


OleDbPermission 建構函式

定義

初始化 OleDbPermission 類別的新執行個體。

多載

OleDbPermission()
已淘汰.
已淘汰.

初始化 OleDbPermission 類別的新執行個體。

OleDbPermission(PermissionState)

初始化 OleDbPermission 類別的新執行個體。

OleDbPermission(PermissionState, Boolean)
已淘汰.
已淘汰.

初始化 OleDbPermission 類別的新執行個體。

OleDbPermission()

來源:
OleDbPermission.cs
來源:
OleDbPermission.cs

警告

use OleDbPermission(PermissionState.None)

警告

OleDbPermission() has been deprecated. Use the OleDbPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202

初始化 OleDbPermission 類別的新執行個體。

public:
 OleDbPermission();
public OleDbPermission ();
[System.Obsolete("use OleDbPermission(PermissionState.None)", true)]
public OleDbPermission ();
[System.Obsolete("OleDbPermission() has been deprecated.  Use the OleDbPermission(PermissionState.None) constructor.  http://go.microsoft.com/fwlink/?linkid=14202", true)]
public OleDbPermission ();
Public Sub New ()
屬性

適用於

OleDbPermission(PermissionState)

來源:
OleDbPermission.cs
來源:
OleDbPermission.cs

初始化 OleDbPermission 類別的新執行個體。

public:
 OleDbPermission(System::Security::Permissions::PermissionState state);
public OleDbPermission (System.Security.Permissions.PermissionState state);
new System.Data.OleDb.OleDbPermission : System.Security.Permissions.PermissionState -> System.Data.OleDb.OleDbPermission
Public Sub New (state As PermissionState)

參數

state
PermissionState

其中一個 PermissionState 值。

適用於

OleDbPermission(PermissionState, Boolean)

來源:
OleDbPermission.cs
來源:
OleDbPermission.cs

警告

use OleDbPermission(PermissionState.None)

警告

OleDbPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the OleDbPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202

初始化 OleDbPermission 類別的新執行個體。

public:
 OleDbPermission(System::Security::Permissions::PermissionState state, bool allowBlankPassword);
public OleDbPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
[System.Obsolete("use OleDbPermission(PermissionState.None)", true)]
public OleDbPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
[System.Obsolete("OleDbPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated.  Use the OleDbPermission(PermissionState.None) constructor.  http://go.microsoft.com/fwlink/?linkid=14202", true)]
public OleDbPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
new System.Data.OleDb.OleDbPermission : System.Security.Permissions.PermissionState * bool -> System.Data.OleDb.OleDbPermission
[<System.Obsolete("use OleDbPermission(PermissionState.None)", true)>]
new System.Data.OleDb.OleDbPermission : System.Security.Permissions.PermissionState * bool -> System.Data.OleDb.OleDbPermission
[<System.Obsolete("OleDbPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated.  Use the OleDbPermission(PermissionState.None) constructor.  http://go.microsoft.com/fwlink/?linkid=14202", true)>]
new System.Data.OleDb.OleDbPermission : System.Security.Permissions.PermissionState * bool -> System.Data.OleDb.OleDbPermission
Public Sub New (state As PermissionState, allowBlankPassword As Boolean)

參數

state
PermissionState

其中一個 PermissionState 值。

allowBlankPassword
Boolean

指出是否允許空白密碼。

屬性

備註

列舉 PermissionState 的優先順序高於 AllowBlankPassword 屬性。 因此,如果您設定 AllowBlankPasswordfalse,也必須將 設定 PermissionStateNone ,以防止使用者使用空白密碼建立連線。

適用於