|
![]() |
#1 |
Участник
|
Привет, форум все же больше навиженовский.
Подобные вопросы принято задавать на axforum.info Ваша проблема, скорее всего связана с областью действия assert. https://msdn.microsoft.com/en-us/library/bb190039.aspx Цитата:
Declare a variable for the relevant permission class.
Create a new instance of the class. Request permission by using the assert method on the permission class. Revert the assertion (to limit the scope of the permission) after the CAS-enabled API has been used; optional. Permission is automatically reverted when the method finishes executing. |
|
![]() |
#2 |
Участник
|
я понял, спасибо.
|
|
![]() |
#3 |
Участник
|
Нашел решение, если кому нужно.
Код: //Method :: executeQuery ======================================= server static ResultSet executeQuery(str sql, Connection connection = new Connection()) { SqlStatementExecutePermission sqlPerm; Statement statement; ResultSet resultSet; ; sqlPerm = new SqlStatementExecutePermission(sql); sqlPerm.assert(); statement = connection.createStatement(); resultSet = statement.executeQuery(sql); CodeAccessPermission::revertAssert(); return resultSet; } //Job :: Job_DirectSQLTest ===================================== static void Job_DirectSQLTest(Args _args) { ResultSet testRS; ; testRS = SQLUtility::executeQuery("select top 10 ItemId from InventTable"); while(testRS.next()) { info(testRS.getString(1)); } } |
|