您的位置:首页 > 数据库

AX中动态产生方法并且调用,解决根据不同条件产生不同SQL逻辑的问题很方便

2009-02-12 17:39 721 查看
Code

static void Job71(Args _args)

{

str string;

inventtable inventtable;

xppCompiler compiler ;

;

compiler = new xppCompiler();

select firstonly inventtable;

string = @"str hello()

{

inventtable inventtable1;

;

";

string += "select inventtable1 where inventtable1.itemid == '"+inventtable.ItemId+"'";

string +=@";

info(inventtable1.itemid);

return inventtable1.itemid;

} ";

info(string);

string = strfmt(string);

if(compiler.compile(string))

{

string = runbuf(string);

info(string);

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐