OdbcPermissionAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Code Access Security is not supported or honored by the runtime.
Associates a security action with a custom security attribute.
public ref class OdbcPermissionAttribute sealed : System::Data::Common::DBDataPermissionAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public sealed class OdbcPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class OdbcPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type OdbcPermissionAttribute = class
inherit DBDataPermissionAttribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)>]
type OdbcPermissionAttribute = class
inherit DBDataPermissionAttribute
Public NotInheritable Class OdbcPermissionAttribute
Inherits DBDataPermissionAttribute
- Inheritance
-
OdbcPermissionAttribute
- Attributes
Remarks
Caution
Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.
This class is intended for future use when the .NET Framework Data Provider for ODBC is enabled for partial trust scenarios. The .NET Framework Data Provider for ODBC currently requires FullTrust permission. Currently, using the OdbcPermissionAttribute class has no effect. For more information, see Code Access Security and ADO.NET.
Constructors
| Name | Description |
|---|---|
| OdbcPermissionAttribute(SecurityAction) |
Initializes a new instance of the OdbcPermissionAttribute class with one of the SecurityAction values. |
Properties
| Name | Description |
|---|---|
| AllowBlankPassword |
Gets or sets a value indicating whether a blank password is allowed. (Inherited from DBDataPermissionAttribute) |
| ConnectionString |
Gets or sets a permitted connection string. (Inherited from DBDataPermissionAttribute) |
| KeyRestrictionBehavior |
Identifies whether the list of connection string parameters identified by the KeyRestrictions property are the only connection string parameters allowed. (Inherited from DBDataPermissionAttribute) |
| KeyRestrictions |
Gets or sets connection string parameters that are allowed or disallowed. (Inherited from DBDataPermissionAttribute) |
Methods
| Name | Description |
|---|---|
| CreatePermission() |
Returns an OdbcPermission object that is configured according to the attribute properties. |
| ShouldSerializeConnectionString() |
Identifies whether the attribute should serialize the connection string. (Inherited from DBDataPermissionAttribute) |
| ShouldSerializeKeyRestrictions() |
Identifies whether the attribute should serialize the set of key restrictions. (Inherited from DBDataPermissionAttribute) |