Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Error in query (Using JDeveloper9)

Reply
Thread Tools

Error in query (Using JDeveloper9)

 
 
jeganathan jeganathan is offline
Junior Member
Join Date: Jun 2008
Posts: 2
 
      06-10-2008
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;
}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET won't retrieve query results that depend on union query Eric Nelson ASP .Net 5 02-04-2009 10:51 PM
Trying to query the Address table data of AdventureWorks database from Query Analyzer - need help! Learner ASP .Net 1 01-30-2006 08:58 PM
Build dynamic sql query for JSTL <sql:query> Anonymous Java 0 10-13-2005 10:01 PM
xpath query query David Gordon XML 2 05-18-2005 03:33 PM
CAML Query: Multiple Query Fields Issue Jon F. ASP .Net Web Services 0 05-12-2004 08:19 PM



Advertisments