// Required import packages
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.jbo.domain.Number;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
//
try
{
Connection conn = paramOAPageContext.getApplicationModule(paramOAWebBean).getOADBTransaction().getJdbcConnection();
String Query ="SELECT empId resultId,empName resultName,empPosition resultPos from XXXXX_TABLE WHERE DeptId=:1";
PreparedStatement stmt = conn.prepareStatement(Query);
stmt.setInt(1, departmentId);
for (ResultSet resultset = stmt.executeQuery(); resultset.next(); )
{
int employeeId = resultset.getInt("resultId");
String employeeName = resultset.getstring("resultName");
String employeePosition = resultset.getString("resultPos");
}
stmt.close();
}catch(SQLException sqle)
{
throw new OAException("Exception Block"+sqle);
}
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.jbo.domain.Number;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
//
try
{
Connection conn = paramOAPageContext.getApplicationModule(paramOAWebBean).getOADBTransaction().getJdbcConnection();
String Query ="SELECT empId resultId,empName resultName,empPosition resultPos from XXXXX_TABLE WHERE DeptId=:1";
PreparedStatement stmt = conn.prepareStatement(Query);
stmt.setInt(1, departmentId);
for (ResultSet resultset = stmt.executeQuery(); resultset.next(); )
{
int employeeId = resultset.getInt("resultId");
String employeeName = resultset.getstring("resultName");
String employeePosition = resultset.getString("resultPos");
}
stmt.close();
}catch(SQLException sqle)
{
throw new OAException("Exception Block"+sqle);
}