来自 Adf 的 Ebs 过程调用
Ebs Procedure call from Adf
您好,我正在尝试从 adf 应用程序调用 ebs 过程。该过程需要 3 个输入参数和 returns 2 o/p。但是当我执行 cs.executeUpdate()
时它显示错误 Missing IN or OUT parameter at index::6
谁能帮我找出来?
HelperMethod(写在AppModuleImpl中)
public String getEmployeeName(String username, String password) {
CallableStatement cs = null;
try {
cs =
getDBTransaction().createCallableStatement("begin ? :=APPS.XX_IE_ENTER_DELEGATION.oie_enter_delegation(?,?,?,?,?); end;",
0);
cs.setString(1, username);
cs.setString(2, password);
cs.setString(3, "31442");
cs.registerOutParameter(4, Types.INTEGER);
cs.registerOutParameter(5, Types.VARCHAR);
cs.execute(); // **Getting Error**
cs.close();
return cs.getString(3);
} catch (SQLException e) {
throw new JboException(e);
}
}
按钮动作监听器
public void getFromEbs(ActionEvent actionEvent) {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("getEmployeeName");
Object result = operationBinding.execute();
System.out.println("Result= " + result); // result will be the output of PL function
}
由于您在语句的开头添加了 "begin ? := APPS.XX"
,这意味着您正在调用一个函数并等待它的结果。
如果您尝试调用过程而不是您所说的函数,则应将其更改为 "begin APPS.XX"
。
您好,我正在尝试从 adf 应用程序调用 ebs 过程。该过程需要 3 个输入参数和 returns 2 o/p。但是当我执行 cs.executeUpdate()
时它显示错误 Missing IN or OUT parameter at index::6
谁能帮我找出来?
HelperMethod(写在AppModuleImpl中)
public String getEmployeeName(String username, String password) {
CallableStatement cs = null;
try {
cs =
getDBTransaction().createCallableStatement("begin ? :=APPS.XX_IE_ENTER_DELEGATION.oie_enter_delegation(?,?,?,?,?); end;",
0);
cs.setString(1, username);
cs.setString(2, password);
cs.setString(3, "31442");
cs.registerOutParameter(4, Types.INTEGER);
cs.registerOutParameter(5, Types.VARCHAR);
cs.execute(); // **Getting Error**
cs.close();
return cs.getString(3);
} catch (SQLException e) {
throw new JboException(e);
}
}
按钮动作监听器
public void getFromEbs(ActionEvent actionEvent) {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("getEmployeeName");
Object result = operationBinding.execute();
System.out.println("Result= " + result); // result will be the output of PL function
}
由于您在语句的开头添加了 "begin ? := APPS.XX"
,这意味着您正在调用一个函数并等待它的结果。
如果您尝试调用过程而不是您所说的函数,则应将其更改为 "begin APPS.XX"
。