Jaa


SqlDataDictionaryPermission Class

Definition

The SqlDataDictionaryPermission class controls the ability to access the methods on the and is designed to check permissions for specific APIs. For a list of all protected APIs, see Secured APIs.

public ref class SqlDataDictionaryPermission : Microsoft::Dynamics::Ax::Xpp::CodeAccessPermission
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class SqlDataDictionaryPermission : Microsoft.Dynamics.Ax.Xpp.CodeAccessPermission
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type SqlDataDictionaryPermission = class
    inherit CodeAccessPermission
Public Class SqlDataDictionaryPermission
Inherits CodeAccessPermission
Inheritance
Microsoft.Dynamics.AX.KernelInterop.ProxyBase
SqlDataDictionaryPermission
Attributes

Remarks

You must call the assert method on the same tier, usually the server tier, that the corresponding CodeAccessPermission::demand method is called on before the protected API is executed. Call a method on the server tier from one of the following:

  • A server static method
  • A class instance method that is set to run on the server by using the RunOn class property.

The following example deletes data from the xRefNames table. The assert method is called to declare that the code can then instantiate the AsciiIo class that is used to read and write data to a file.

{ 
    DictTable dictTable = new DictTable(tablenum(xRefNames)); 
    str sqlTableName; 
    SqlDataDictionary sqlTable; 
    if (dictTable && dictTable.enabled()) 
    { 
        sqlTableName = dictTable.name(DbBackend::Sql); 
        sqlTable = new SqlDataDictionary(); 
        // Try to truncate only if the table does exist 
        // in the SQL database. 
        if (sqlTable.tableExist(sqlTableName)) 
        { 
            new SqlDataDictionaryPermission( 
                methodstr(SqlDataDictionary, tableTruncate)).assert(); 
            sqlTable.tableTruncate(tablenum(xRefNames)); 
            CodeAccessPermission::revertAssert(); 
        } 
    } 
}

Constructors

SqlDataDictionaryPermission()
SqlDataDictionaryPermission(IntPtr)
SqlDataDictionaryPermission(String)

Fields

__k_SqlDataDictionaryPermissionId
kernelClass (Inherited from XppObjectBase)

Methods

__shouldCallNew(Type)
addXppProxyReference(Type, Object) (Inherited from XppObjectBase)
assert()

Declares that the calling code can invoke an API that is protected by a permission.

(Inherited from CodeAccessPermission)
Call(String, Object[], Type[], Object[]) (Inherited from XppObjectBase)
cancelTimeOut(Int32) (Inherited from XppObjectBase)
Copy()

Creates and returns a copy of the current permission class object.

createKernelClass(Object[], Type[], Object[]) (Inherited from XppObjectBase)
demand()

Checks the call stack to determine whether the permission that is required to invoke an API has been granted to the calling code.

(Inherited from CodeAccessPermission)
equal(XppObjectBase) (Inherited from XppObjectBase)
finalize() (Inherited from XppObjectBase)
GetIntPtr() (Inherited from XppObjectBase)
GetKernelInstanceUniqueId() (Inherited from XppObjectBase)
getTimeOutTimerHandle() (Inherited from XppObjectBase)
getXppProxyReference(Type) (Inherited from XppObjectBase)
handle()
IsManagedValid() (Inherited from XppObjectBase)
Issubsetof(CodeAccessPermission)

Determines whether a current permission is a subset of the specified permission.

kernelhandle()
KernelInstanceDisposed() (Inherited from XppObjectBase)
MakeReflectionCall(String, Object[]) (Inherited from XppObjectBase)
newmethod()

Initializes a new instance of the CodeAccessPermission class.

(Inherited from CodeAccessPermission)
newmethod(String)

Creates a new instance of the SQLDataDictionaryPermission class.

notify() (Inherited from XppObjectBase)
notifyAll() (Inherited from XppObjectBase)
objectOnServer()
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32, Boolean)
Obsolete.
(Inherited from XppObjectBase)
setTimeOut(String, Int32)
Obsolete.
(Inherited from XppObjectBase)
usageCount() (Inherited from XppObjectBase)
VerifyKernelClass() (Inherited from XppObjectBase)
wait() (Inherited from XppObjectBase)
Xml() (Inherited from XppObjectBase)
Xml(Int32) (Inherited from XppObjectBase)

Applies to