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);
}
}
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);
}
}
相关文章推荐
- Java反射:根据方法名动态调用方法,解决商品动态属性取值问题。
- Java反射根据不同方法名动态调用不同的方法(实例)
- 关于dorado框架datatable处的右键菜单无法根据具体数据实现动态分别显示不同菜单的解决方法
- 使用 Hibernate 在 JPA 中 调用 generateSchema 会出现执行两次 SQL 语句问题的解决方法
- 在项目中,多个方法会调用相同的sql语句,怎么解决各个方法的不同sql查询,解决冲突。
- android调用系统相机的方法,并且解决三星手机遇到的问题
- 编写SqlHelper使用,在将ExecuteReader方法封装进而读取数据库中的数据时会产生Additional information: 阅读器关闭时尝试调用 Read 无效问题,解决方法与解释
- 遇到动态调用Parameters .AddWithValue()参数类型问题的解决方法
- SQL中WHERE变量IS NULL条件导致全表扫描问题的解决方法
- 编写SqlHelper使用,在将ExecuteReader方法封装进而读取数据库中的数据时会产生Additional information: 阅读器关闭时尝试调用 Read 无效问题,解决方法与解释
- java动态加载指定的类或者jar包反射调用其方法-涉及其他jar中的类就报ClassNotFound问题分析及解决思路
- Android RSA与Java RSA加密不同标准产生问题的解决方法
- 调用带参数的webservice产生的问题和解决的方法
- SQL中WHERE变量IS NULL条件导致全表扫描问题的解决方法
- MySQL死锁问题实例分析及解决方法(主要是SQL语句可能会产生的问题)
- Java反射 根据不同方法名动态调用不同的方法
- android调用系统相机的方法,并且解决三星手机遇到的问题,图片旋转、压缩
- java用jni调用dll动态库出现Can't find dependent libraries问题的解决方法
- SQL中WHERE变量IS NULL条件导致全表扫描问题的解决方法
- Python中unittest测试根据不同参数组合产生单独的test case的解决方法