函数
//计算添加的费用
function FYJS(sslp , fjh,sfbzbh ,dj ,sl){
//获取连接
var Ret = 0;
var conn = getConnection(getApplication());
var cs = null;
try {
cs = conn.prepareCall("{call SP_FYJS(?,?,?,?,?,?)}");
cs.setString(1,sslp);
cs.setString(2,fjh);
cs.setString(3,sfbzbh);
cs.setNumeric (4,dj);
cs.setNumeric (5,sl);
cs.registerOutParameter(6, Packages.java.sql.Types.Numeric );
cs.execute();
Ret = cs.getNumeric (6);
$PRINTER.println("***************************Ret***"+Ret);
} catch (e) {
} finally {
try {
if(cs != null){
cs.close();
}
if(conn != null){
conn.close();
}
} catch (ex) {
}
}
println(Ret)
return Ret;
}
调用
irt=FYJS(sslp , fjh,sfbzbh ,dj ,sl);
为啥返回值是0呢 我在sql里面输入同样的参数 结果就不是零 |