Hi friend,
I am using JDeveloper9 now. First i used JDeveloper10 and developed the project. Now i want to convert the code created with JDeveloper10 to JDeveloper9.
The error i am facing is
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT fnd_profile.value_specific(?, ?, ?, ?, ?) FROM dual
The code i wrote is
public String getProfileValue(String profileName, int userId, int orgId,
int applId, int respId) {
String profileVal = "";
PreparedStatement pst = null;
ResultSet rs = null;
try {
StringBuffer query = new StringBuffer();
query.append("SELECT fnd_profile.value_specific(?, ?, ?, ?, ?)\n");
query.append(" FROM dual\n");
pst =
connection.createPreparedStatement(query.toString( ), connection.DEFAULT);
pst.setString(1, profileName);
pst.setInt(2, userId);
pst.setInt(3, respId);
pst.setInt(4, applId);
pst.setInt(5, orgId);
rs = pst.executeQuery();
if (rs.next()) {
profileVal = rs.getString(1);
}
} catch (SQLException e) {
throw new OAException(e.getMessage());
} finally {
DatabaseUtilities.close(pst, rs);
}
return profileVal;
}
|