微软ERP Dynamics 专业论坛flyday复制地址

微软ERP Dynamics Ax Axapta SL CRM Nav 专业论坛

公告栏
微软ERP Dynamics Ax Axapta SL CRM Nav 专业论坛-秋毫ERP咨询论坛: http://www.QiuHao.com
控制面板
推荐博客圈
您的消息:
日历
<2008年11月>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
留言簿(111)
随笔档案
文章档案
微软ERP
Hi!server static void main(Args _args)

{

    DictTable  dictTable;

    Connection connection;

    Statement  statement;

    str        sql;

    ResultSet  resultSet;

    SqlStatementExecutePermission perm;

    ;

    dictTable = new DictTable(tableNum(CustTable));

    if (dictTable != null)

        {

           connection = new Connection();

           sql = strfmt( "SELECT * FROM %1", dictTable.name(DbBackend::Sql) );

           perm = new SqlStatementExecutePermission(sql);

           // Check for permission to use the statement.

           perm.assert();

           statement = connection.createStatement();

           resultSet = statement.executeQuery(sql);

           // End the scope of the assert call.

           CodeAccessPermission::revertAssert();

        }

}

 

Error:
Request for the permission of type 'SqlStatementExecutePermission' failed.

(S)\Classes\SqlStatementExecutePermission\demand
(S)\Classes\Statement\executeQuery
(C)\Jobs\main - line 20

 

这段例子是在msdn中给出的,可是运行的时候却给出上面的错误。明白的朋友给点建议!

 

作者:秋毫ERP咨询 阅读() 评论()  编辑 发表于:2008-01-27 22:42
版权声明:天极是本Blog托管服务提供商。如本文牵涉版权问题,天极不承担相关责任,请版权拥有者直接与文章作者联系解决。
Powered by:

Copyright © 秋毫ERP咨询