''OleDbPermission'' ''serializable'

OleDbPermission serializable

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

With this class, you can ensure that the current process has the required security level to access the OLE DB .NET provider before you attempt to open a connection. If it doesn't, a System.Security.SecurityException will be thrown. You can also use this class to programmatically revoke the permission to access the OLE DB .NET provider for the current method call.

Note that this class pertains only to code access security (the policy of allowed and disallowed actions you have configured using the .NET Framework Configuration Tool or the caspol.exe command-line utility). For more information, refer to the reference for the base class System.Data.Common.DBDataPermission . 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 OleDbPermission : System.Data.Common.DBDataPermission {
// Public Constructors
   public OleDbPermission(  );  
   public OleDbPermission(System.Security.Permissions.PermissionState state);
   public OleDbPermission(System.Security.Permissions.PermissionState state, 
      bool allowBlankPassword);
// Public Instance Properties
   public string Provider{set; get; } 
// Public Instance Methods
   public override IPermission Copy(  );              // overrides System.Data.Common.DBDataPermission
   public override void FromXml(System.Security.SecurityElement securityElement);
                             // overrides System.Data.Common.DBDataPermission
   public override IPermission Intersect(System.Security.IPermission target);               
                              // overrides System.Data.Common.DBDataPermission
   public override SecurityElement ToXml(  );     // overrides System.Data.Common.DBDataPermission
   public override IPermission Union(System.Security.IPermission target);          // overrides System.Data.Common.


System.Object figs/U2192.gif System.Security.CodeAccessPermission(System.Security.IPermission, System.Security.ISecurityEncodable , System.Security.IStackWalk) figs/U2192.gif System.Data.Common.DBDataPermission(System.Security.Permissions.IUnrestrictedPermission) figs/U2192.gif OleDbPermission

    Part I: ADO.NET Tutorial
    Part II: ADO.NET Core Classes
    Part III: API Quick Reference
    Chapter 34. The System.Data Namespace