OleDbPermissionAttribute serializable

OleDbPermissionAttribute serializable

System.Data.OleDb (system.data.dll) sealed class

This class allows you to ensure that the current process has the required code-access security permission to access the OLE DB provider before executing code that interacts with the database. It also allows you to temporarily revoke this permission. Typically, you apply this attribute to the declaration of a method that accesses the database or to the definition of a class that contains data access code in every method. You can also apply the attribute to an assembly, struct, or constructor. The OleDbPermissionAttribute provides essentially the same functionality as the OleDbPermission class, but it allows you to add declarative security code instead of explicit (inline) code.

Note that this attribute pertains only to code access security (the policy of allowed and disallowed actions you have configured using the .NET Framework Configuration Tool). For more information, refer to the reference for the base class System.Data.Common.DBDataPermissionAttribute . Currently, there are only two additional restrictions you can impose: denying the right to use blank passwords in a connection string and restricting the allowed OLE DB drivers.

 public sealed class  OleDbPermissionAttribute  : System.Data.Common.DBDataPermissionAttribute {  // Public Constructors  public  OleDbPermissionAttribute  (System.Security.Permissions.SecurityAction   action   );  // Public Instance Properties  public string  Provider  {set; get; }  // Public Instance Methods  public override IPermission  CreatePermission  (  );  // overrides System.Security.Permissions.SecurityAttribute  } 

Hierarchy

System.Object figs/u2192.gif System.Attribute figs/u2192.gif System.Security.Permissions.SecurityAttribute figs/u2192.gif System.Security.Permissions.CodeAccessSecurityAttribute figs/u2192.gif System.Data.Common.DBDataPermissionAttribute figs/u2192.gif OleDbPermissionAttribute

Valid On

Assembly, Class, Struct, Constructor, Method



ADO. NET in a Nutshell
ADO.NET in a Nutshell
ISBN: 0596003617
EAN: 2147483647
Year: 2005
Pages: 415

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net