lingdanglfw(DAX)

导航

Exec SQL IN AX(self)

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;
}

posted on 2008-07-15 10:55  lingdanglfw  阅读(155)  评论(0编辑  收藏  举报