OleDbPermission 构造函数

定义

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

重载

OleDbPermission()

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

OleDbPermission(PermissionState)

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

OleDbPermission(PermissionState, Boolean)

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

OleDbPermission()

警告

此 API 现已过时。

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

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

OleDbPermission(PermissionState)

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

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 值之一。One of the PermissionState values.

OleDbPermission(PermissionState, Boolean)

警告

此 API 现已过时。

初始化 OleDbPermission 类的新实例。Initializes a new instance of the OleDbPermission class.

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.  https://go.microsoft.com/fwlink/?linkid=14202", true)]
[System.Obsolete("use OleDbPermission(PermissionState.None)", true)]
public OleDbPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
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 值之一。One of the PermissionState values.

allowBlankPassword
Boolean

指示是否允许空白密码。Indicates whether a blank password is allowed.

属性

注解

PermissionState 枚举优先于 AllowBlankPassword 属性。The PermissionState enumeration takes precedence over the AllowBlankPassword property. 因此,如果将 AllowBlankPassword 设置为 false,则还必须将 PermissionState 设置为 None,以防止用户使用空白密码建立连接。Therefore, if you set AllowBlankPassword to false, you must also set PermissionState to None to prevent a user from making a connection using a blank password.

适用于