Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

SqlStatementExecutePermission class ,Assert(),REvertAssert()

Posted on by 32

statement = userConnection.createStatement();

sqlPermission = new SqlStatementExecutePermission( sqlStatement);

sqlPermission.assert();

resultSet = statement.executeQuery(sqlStatement);

CodeAccessPermission::revertAssert();

Can Anyone tell me details about each line. Please give easy information about the all the classes and methods above

  • Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: SqlStatementExecutePermission class ,Assert(),REvertAssert()

    As the documentation says, assert() method is used to request the permissions, in this case permissions to execute direct SQL queries.

    revertAssert() is used to remove the permissions. You already read the documentation, so you already know that it's optional and why.

  • MSDev Profile Picture
    MSDev 32 on at
    RE: SqlStatementExecutePermission class ,Assert(),REvertAssert()

    Hello Martin. i already read it but not understand it clearly. I am reading topic about "Executing Direct SQL statement"

    Can you give me Detail about the function of  SqlStatementExecutePermission class,sqlPermission.assert();

    CodeAccessPermission::revertAssert(); by giving another example

  • Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: SqlStatementExecutePermission class ,Assert(),REvertAssert()

    Please read the documentation first: Code Access Security. Then ask specific questions if you still don't understand something.

    By the way, please always use Insert > Code (in the rich-formatting view) to paste source code to this forum.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans