4727| 6
|
[结贴] 悬赏:X5如何调用存储过程 |
10金币
最佳答案1、定义一个执行存储过程的action
2、执行保存动作时调用定义的action
一下是java中调用存储过程代码
//取得连接
Connection conn = ModelUtils.getConnectionInTransaction(“数据源”);//数据源格式比如:/system/data即data位置
//调用存储过程
CallableStatement cstmt = conn.prepareCall("{call 存储过程名称(?,?....)}");
cstmt.setString(1, 参数1);
cstmt.setString(2, 参数2);
...
| ||
发表于 2012-11-15 09:32:27
|
显示全部楼层
点评
谢了:)
| ||
发表于 2012-11-15 09:36:06
|
显示全部楼层
| ||
发表于 2012-11-15 10:45:49
|
显示全部楼层
| ||
发表于 2012-11-15 11:02:23
|
显示全部楼层
| ||
GMT+8, 2024-5-9 04:26 , Processed in 0.108585 second(s), 26 queries .
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.