PreparedStatement in OAF
String query="SQL STMT";
try{
Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
PreparedStatement stmt = conn.prepareStatement(query);
stmt.setString(1, BINDPARAM);
for(ResultSet resultset = stmt.executeQuery(); resultset.next();)
{
billingCoderesult = resultset.getString("GETVALUE");
}
}
catch(Exception exception)
{
throw new OAException("EXE", OAException.ERROR);
}
String query="SQL STMT";
try{
Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
PreparedStatement stmt = conn.prepareStatement(query);
stmt.setString(1, BINDPARAM);
for(ResultSet resultset = stmt.executeQuery(); resultset.next();)
{
billingCoderesult = resultset.getString("GETVALUE");
}
}
catch(Exception exception)
{
throw new OAException("EXE", OAException.ERROR);
}
No comments:
Post a Comment