Exec SQL IN AX(self)

安稳与你 提交于 2020-03-10 10:28:18
Class:(一定要配 Run On Server)
resultSet TestDirectSQLTwo()
{
    connection              con=new connection();
    statement               stm=con.createStatement();
    SqlStatementExecutePermission  sqlStatementExecutePermission;
    ResultSET               R,R1;
    str    10000                 SQL,SQL1;
    int                     i;
    itemId                  itemId;
    qty                     _qty;
    ;
    i = 0;
    SQL = "select * from inventtable ";
    sqlStatementExecutePermission = new SqlStatementExecutePermission(sql);
    sqlStatementExecutePermission.assert();
    con.ttsbegin();
    R = stm.executeQuery(SQL);
    return R;
//    while( R.next())
//    {
//
//           ItemID        =  R.getString(1);
//           info(Itemid);
//    }con.ttscommit();
//    pause;
}
 
 
 
JOB
static void TestDirectSQLTwo(Args _args)
{
    AACdltllDemoBcnClass AACdltllDemoBcnClass = new AACdltllDemoBcnClass();
    ResultSet  rset;
    ItemId  itemid;
    ;
    rset = AACdltllDemoBcnClass.TestDirectSQLTwo();
    while( rset.next())
    {
           ItemID        =  Rset.getString(1);
           //ItemID   = Rset.getString(1);
           ItemID   = Rset.getString(20);
           print Itemid;
     }
     pause;
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!