AX 4.0 or 2009 must be running on the server side,
otherwise system will pop-up permissions request failed error message!
remark by Jimmy July 13th 2010
static server void Jimmy_SQLinAX2009(Args _args) { Connection Con; Statement St; SqlSystem sqlSystem = new SqlSystem(); str sqlStmt; int i; ResultSet rs; SqlStatementExecutePermission sqlStatementExecutePermission; ; sqlStmt = 'SELECT top 5 * from CustTable '; new SqlStatementExecutePermission(sqlStmt).assert(); Con = new Connection(); st = Con.createStatement(); rs = st.executeQuery(sqlStmt); while (rs.next()) { info(rs.getString(1)); } info(enum2str(new DictSecurityKey(securityKeynum(SysDevelopment)).rights())); info(sqlSystem.loginName()); } /* AX 4.0 or 2009 must be running on the server side, otherwise system will pop-up permissions request failed error message! remark by Jimmy July 13th 2010 */