SqlClientPermission 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 SqlClientPermission 類別的新執行個體。
多載
SqlClientPermission() |
已淘汰.
已淘汰.
初始化 SqlClientPermission 類別的新執行個體。 |
SqlClientPermission(PermissionState) |
初始化 SqlClientPermission 類別的新執行個體。 |
SqlClientPermission(PermissionState, Boolean) |
已淘汰.
已淘汰.
初始化 SqlClientPermission 類別的新執行個體。 |
SqlClientPermission()
警告
use SqlClientPermission(PermissionState.None)
警告
SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202
初始化 SqlClientPermission 類別的新執行個體。
public:
SqlClientPermission();
public SqlClientPermission ();
[System.Obsolete("use SqlClientPermission(PermissionState.None)", true)]
public SqlClientPermission ();
[System.Obsolete("SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)]
public SqlClientPermission ();
Public Sub New ()
- 屬性
另請參閱
- ADO.NET 概觀 \(部分機器翻譯\)
適用於
SqlClientPermission(PermissionState)
初始化 SqlClientPermission 類別的新執行個體。
public:
SqlClientPermission(System::Security::Permissions::PermissionState state);
public SqlClientPermission (System.Security.Permissions.PermissionState state);
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState -> System.Data.SqlClient.SqlClientPermission
Public Sub New (state As PermissionState)
參數
- state
- PermissionState
其中一個 PermissionState 值。
另請參閱
- 程式碼存取安全性和 ADO.NET
- ADO.NET 概觀 \(部分機器翻譯\)
適用於
SqlClientPermission(PermissionState, Boolean)
警告
use SqlClientPermission(PermissionState.None)
警告
SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202
初始化 SqlClientPermission 類別的新執行個體。
public:
SqlClientPermission(System::Security::Permissions::PermissionState state, bool allowBlankPassword);
public SqlClientPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
[System.Obsolete("use SqlClientPermission(PermissionState.None)", true)]
public SqlClientPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
[System.Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)]
public SqlClientPermission (System.Security.Permissions.PermissionState state, bool allowBlankPassword);
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> System.Data.SqlClient.SqlClientPermission
[<System.Obsolete("use SqlClientPermission(PermissionState.None)", true)>]
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> System.Data.SqlClient.SqlClientPermission
[<System.Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)>]
new System.Data.SqlClient.SqlClientPermission : System.Security.Permissions.PermissionState * bool -> System.Data.SqlClient.SqlClientPermission
Public Sub New (state As PermissionState, allowBlankPassword As Boolean)
參數
- state
- PermissionState
其中一個 PermissionState 值。
- allowBlankPassword
- Boolean
指出是否允許空白密碼。
- 屬性
備註
列舉 PermissionState 的優先順序高於 AllowBlankPassword 屬性。 因此,如果您設定 AllowBlankPassword 為 false
,您也必須設定 PermissionStateNone
為 ,以防止使用者使用空白密碼建立連線。 如需示範如何使用安全性需求的範例,請參閱代碼存取安全性和 ADO.NET。
另請參閱
- 程式碼存取安全性和 ADO.NET
- ADO.NET 概觀 \(部分機器翻譯\)