目前我在包下有这个程序,当一些人在网页上选择 user_id 时获取 user_name 但现在我想通过向页面添加 ssn 来更改格式,所以当一些人选择 user_id 时,它会在网页文本框上加载用户名和 ssn .. i正在使用可调用语句加载数据.. 我可以在这里更改什么来获取用户名和 ssn
PROCEDURE get_User_name
(
return_code_out OUT VARCHAR2,
return_msg_out OUT VARCHAR2,
user_id_in IN user.user_id%TYPE,
user_name_out OUT user.user_name%TYPE
)
IS
BEGIN
return_code_out := '0000';
return_msg_out := 'OK';
SELECT c.user_name INTO user_name_out
FROM user c
WHERE c.user_id = user_in;
END get_user_name;
这是我的加载功能
public String load() {
String retMsg = null;
DbUtil db = null;
java.sql.CallableStatement cstmt = null;
try {
db = new DbUtil();
cstmt = db.prepareCall("{ call sample.PACK_USER.get_user_name(?, ?, ?, ?) }");
cstmt.registerOutParameter(1,OracleTypes.VARCHAR);
cstmt.registerOutParameter(2,OracleTypes.VARCHAR);
cstmt.setString(3,this.getuserid());
cstmt.registerOutParameter(4,OracleTypes.VARCHAR);
cstmt.execute();
if (cstmt.getString(1).equals(Constants.dbSuccess))
myLog.log(myLog.INFORMATION, "UserBean.load() DB return code and message = " + retMsg);
else {
retMsg = cstmt.getString(1) + " - " + cstmt.getString(2);
myLog.log(myLog.ERROR, "UserBean.load() DB return code and message = " + retMsg);
}
this.setUserName(cstmt.getString(4));
return retMsg;
}