web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

SqlStatementExecutePermission class ,Assert(),REvertAssert()

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at

    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.

  • MSDev Profile Picture
    32 on at

    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
    237,795 Most Valuable Professional on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans