How the db connection is used in the piece of code of jsp

dear sir,
i have to important question.
i am pasting the code of a jsp file below.... please look in to this...
in this page.. how is he making a database connection... and in this page
where are the select statements and queries.... i have tried many times reading
this ..but i could not find the queries ..not even any one.
if anyone sees this jsp file also ... he will not be able to see the queries.
can u please help me .. how to do this type of connection and also how to use queries
like select insert and delete and update .
an example will help me out...please help me...
Ramesh
the file is below....
<%@ include file="jtfincl.jsp" %>
<%@ page language="java" %>
<%@ page import="oracle.apps.ibu.common.IBUContext" %>
<%@ page import="oracle.apps.ibu.common.IbuException" %>
<%@ page import="oracle.apps.ibu.common.Employee" %>
<%@ page import="oracle.apps.ibu.common.EmployeeInfo" %>
<%@ page import="oracle.jdbc.driver.*" %>
<%@ page import="oracle.apps.jtf.aom.transaction.*" %>
<%@ page import="oracle.apps.jtf.base.resources.*" %>
<%@ page import="oracle.apps.jtf.base.interfaces.MessageManagerInter"%>
<%@ page import="oracle.apps.ibu.registration.IbuRegistration" %>
<%@ page import="oracle.apps.ibu.registration.CustomerVO" %>
<%@ page import="oracle.apps.ibu.common.IDNamePair" %>
<%@ page import="oracle.apps.ibu.common.*" %>
<%@ page import="oracle.apps.ibu.registration.*" %>
<%@ page import="java.math.BigDecimal" %>
<jsp:useBean id = "_displayManager"
class = "oracle.apps.ibu.common.DisplayManager"
scope = "application" />
<jsp:useBean id = "ibuPromptManager"
class = "oracle.apps.ibu.common.PromptManager"
scope = "application" />
<%
String appName= "IBU";
boolean stateless=true;      // used for jtfsrfp.jsp
SiteProperty.load();
String username = SiteProperty.getGuestUsername();
String password = SiteProperty.getGuestPassword();
%>
<%@ include file="jtfsrfp.jsp" %>
<%
     String forwardURL = null;
     String backURL = null;
String emailAddress = null;     
     long employeeID = -1;
     String submitType = (String) request.getParameter("submitType");
     IBUContext context = new IBUContext(fwSession);
     String errorKey = "";
     String errorMessage = "";
     String errorStack = "";
     boolean currentStatus = true;
Object lockx = new Object ();
     OracleConnection conn = null;
try
     TransactionScope.begin(lockx);
try
conn = (OracleConnection)
TransactionScope.getConnection();
     catch ( Exception e )
throw new FrameworkException("Error getting connection..");
if ( conn == null )
throw new FrameworkException("Error getting connection..");
     String[] textMsgs = new String[3];
     MessageManagerInter msgMgr = Architecture.getMessageManagerInstance();
     textMsgs[0] = msgMgr.getMessage("IBU_RG_CONTRACT24");
     //textMsgs[0] = " is not a valid employee email address.";
     textMsgs[1] = msgMgr.getMessage("IBU_RG_CONTRACT25");
     //textMsgs[1] = " Cannot get the employee id.";
     textMsgs[2] = msgMgr.getMessage("IBU_RG_CONTRACT13");
     //textMsgs[2] = "submitType is null, please check program.";
     if ( (submitType != null) && "LOGIN".equals( submitType ) )
     forwardURL="jtflogin.jsp";
     backURL="jtflogin.jsp";
     else if ( (submitType != null) && "EMPLOYEE_CHECK".equals( submitType ) )
     forwardURL="ibuemplcheck.jsp";
     backURL="ibuemplcheck.jsp";
     else if ( (submitType != null) && "EMPLOYEE_NUMBER_SUBMIT".equals( submitType ) )
     backURL="ibuemplcheck.jsp";
emailAddress = (String) request.getParameter("emailAddress");     
     pageContext.setAttribute("emailAddress", emailAddress , PageContext.REQUEST_SCOPE);
     employeeID = IbuRegistration.getEmployeeID(conn,emailAddress);
     if (employeeID == -1)
          throw new IbuRegException(emailAddress + "  "+textMsgs[0] + "  " +textMsgs[1]);
     //validate employee
currentStatus = Employee.isValidate(conn,emailAddress);
//currentStatus = IbuRegistration.isEmployeeValid(conn,emailAddress);
     if (!currentStatus)
          throw new IbuRegException(emailAddress + "  " + textMsgs[0]);
     EmployeeInfo employee = Employee.findEmployee(conn,employeeID);
     pageContext.setAttribute("employee", employee , PageContext.REQUEST_SCOPE);
     pageContext.setAttribute("employeeIDStr", Long.toString(employeeID) , PageContext.REQUEST_SCOPE);
     forwardURL="ibuemplinput.jsp";
     else
     { // Cancel button was pressed
     throw new IbuRegException(textMsgs[2]);
     /* "ibuccsii.jsp"; */
     catch ( IbuException e )
TransactionScope.setRollbackOnly();
     errorMessage = e.getMessage();      
     errorStack = IbuRegException.getStack(e);
     pageContext.setAttribute("errorMessage", errorMessage , PageContext.REQUEST_SCOPE);
     pageContext.setAttribute("errorStack", errorStack , PageContext.REQUEST_SCOPE);
     forwardURL = backURL;
     catch (IbuRegException e)
TransactionScope.setRollbackOnly();
     errorMessage = e.getMessage();      
     errorStack = e.getStack();
     pageContext.setAttribute("errorMessage", errorMessage , PageContext.REQUEST_SCOPE);
     pageContext.setAttribute("errorStack", errorStack , PageContext.REQUEST_SCOPE);
     forwardURL = backURL;
     catch ( Exception e )
TransactionScope.setRollbackOnly();
     errorMessage = e.getMessage();      
     errorStack = IbuRegException.getStack(e);
     pageContext.setAttribute("errorMessage", errorMessage , PageContext.REQUEST_SCOPE);
     pageContext.setAttribute("errorStack", errorStack , PageContext.REQUEST_SCOPE);
     forwardURL = backURL;
//throw new FrameworkException( e , "IBU_UNEXPECTED_EXCEPTION");
     finally
TransactionScope.releaseConnection( conn );
TransactionScope.end ( lockx );
     if (forwardURL == null)
     forwardURL="jtflogin.jsp";
%>
     <jsp:forward page= "<%= forwardURL %>" />
<%@ include file="jtferlp.jsp" %>

Well, if I got you right, you can use RETURNING clause of INSERT statement:
SQL> create table test(x int primary key, y varchar2(10));
Table created.
SQL> create sequence test_seq start with 1 cache 100;
Sequence created.
SQL> create trigger test_insert_br before insert on test for each row
  2  declare
  3    l_x int;
  4  begin
  5    select test_seq.nextval into l_x from dual;
  6    :new.x := l_x;
  7  end;
  8  /
Trigger created.
SQL> set serveroutput on
SQL>
SQL> declare
  2    l_new_x int;
  3  begin
  4    insert into test(y) values('One')
  5    returning x into l_new_x;
  6    dbms_output.put_line(l_new_x);
  7    insert into test(y) values('Two')
  8    returning x into l_new_x;
  9    dbms_output.put_line(l_new_x);
10  end;
11  /
1
2
PL/SQL procedure successfully completed.

Similar Messages

  • Data Connection Library used in the workbook is not in a trusted location.

    I got a requirement to display excel charts with data source as SharePoint list.
    Here are the steps which I am following:
    Exported SharePoint list to excel sheet and exported connection file to local drive.
    Uploaded to data connection library.
    Created a new excel file and consumed data from connection file which was stored in data connection library.
    Published the excel sheet to document library with publish options as Chart and Pivot Table.
    Able to see Excel Chart and Pivot table from the browser.
    Getting Error when I try to refresh the excel sheet to get updated data from SharePoint list.
    I added data connection library details to Trusted Data Connection & Trusted File locations still I am getting error. That .odc file is not in Trusted Location.
    "The Data Connection File used in the workbook is not in a trusted location. The following connections
    failed to refresh:"
    Please help me on this and suggest if there is any other approach to fulfill this requirement.

    Hi Pratik,
    Thanks for your input.
    I created a new document library and data connection library and tried the steps mentioned below:
    Configuration
    Enable Claims to Windows Token Service
    The first step, check the status of the Claims to Windows Token Service on SharePoint.
    Use the following instructions to check and enable the Claims to Windows Token Service.
    In Central Administration, in System Settings, click Manage services on server.
    Select Claims to Windows Token Service, and then click Start.
    Verify the service is also running in the Services console:
    In Administrative Tools, click Services.
    Start the Claims to Windows Token Service if it is not running.
    Create a New Secure Store Application
    Create a New Secure Store Target Application and set the credential.
    This credential will be used by SharePoint to access the database. The account set into this step need to have access to the database or SSAS cube/tabular databases.
    Use the following instructions to create and set credential.
    In Central Administration, in Application Management, click Manage service applications.
    Click Secure Store Services, and then click New.
    Target Application Settings:
    Tagert Application ID: ExcelServicesSSS
    Display Name: Excel
    Service Secure Store App
    Contact e-mail: [email protected]
    Target Application Type: Individual
    Target Application Page URL: None
    Click Next.
    Click Next again.
    Target Application Administrators: contoso\administrator
    (Type the user account that will administrate the Secure Store Application.
    Click OK.
    Select Target Application ID ExcelServicesSSS, and then click Set Credential.
    Type Credential Owner, Windows User Name and Password.
    Configure Excel Services
    Add the Application Id created in the previous step to the Excel Services and configure the Trusted Data Connection Library.
    Use the following instructions to add the Application ID.
    In Central Administration, in Application Management, click Manage service applications.
    Click Excel Services Application, and then click Global Settings.
    On External Data, Application ID type ExcelServicesSSS.
    Click OK.
    Click Trusted Data Connection Libraries.
    Click Add Trusted Data Connection Library.
    Address: http://<sharepoint_site>/ (Enter
    the Data Connection Address)
    Click OK.
    But no luck in resolving the issue. Anyhelp would be really thankful.
    Please clarify whether can we pull data from sharepoint list to excel services to display charts?
    Regards,
    N.Srinivas

  • How do I dispute a copyright claim against a video i made using a trailer in iMovie? The only content I used was the video I shot of friends daughter on a merry-go-round.IMovie had the music etc that I used.

    How do I dispute a copyright claim against a video i made using a trailer in iMovie? The only content I used was the video I shot of friends daughter on a merry-go-round.IMovie had the music etc that I used. Here's the message It gives a number of options to choose from if I want to dispute the claim but I don't know which one this would come under. Several obviously don't apply and of the ones left I don't know which content that is in IMovie that I use comes under. "This video is my original content and I own the rights to it" "I have a license or written permission of the property rights holder to use this material" "My use of the content meets the legal requirements for fair use of fair dealing under applicable copyright laws" or "The content is in the public domain or is not eligible for copright protection."

    You want to use the "I have a license..." option, since clearly the music is not yours, but Apple has granted you a license.
    For your license, see this document, section 2.M. http://images.apple.com/legal/sla/docs/iMovie.pdf
    For more on this irritating problem and why it is so hard to solve, see this article. (It is a problem for Final Cut Pro users as well.)
    http://www.larryjordan.biz/app_bin/wordpress/archives/1842

  • How to trace the data dictionary tables used in the standard transaction

    Dear all,
    Help me to trace the data dictionary tables used in the standard transaction "crm_dno_monitor". I need to find the tables where the data are stored.
    or
    Tell me generally how to find the tables used in the standard transaction.
    Regards,
    Prem

    Hi,
    Open the program of that standard transaction in object navigator or SE80..
    Then click on the dictionary structures tab..
    U can find the database tables used in this transaction..
    \[removed by moderator\]
    Regards,
    Rakesh
    Edited by: Jan Stallkamp on Jul 29, 2008 5:29 PM

  • How to know the Z tcodes being used by the company.

    Hi Everyone,
    Can you please tell me how do i know what are the Z tcodes being used by the company.My client is asking me to check all the Ztodes & tell them if there is any problem in them or not.
    Regards,
    Reah

    Hello
    You can find transaction code list in table TSTC.
    All Z transaction code start with character Y or Z, you can query above table to get list of Z transaction codes.
    Additionally you can use transaction code SE93 to view list of transaction Z transaction code and reports associated with these tcodes.
    For second question you should get adequate knowledge transfer from existing IT or developer who developed these reports to be able to understand and test functionality of z tcodes.
    Or
    Please refer functional and technical documentation of these Z tcodes or reports.
    Thanks!
    Raju

  • If I suspend wireless connectivity can I then use the camera connection kit along with the usb ethernet adapter to connect to the internet?

    If I suspend wireless connectivity on my Ipad2, can I then use the camera connection kit alond with the Apple USB Ethernet cable to connect to the internet?

    No, you can't.

  • When I plug my ipod touch into the pc, it tells me:the ipod cannot be used because the apple mobile device service is not started. What does this mean and how do I get rid of that and enable syncing?

    When I plug my ipod touch into the pc, it tells me:the ipod cannot be used because the apple mobile device service is not started. What does this mean and how do I get rid of that and enable syncing?

    Hello Julia,
    Start with this article.
    http://support.apple.com/kb/ts1567
    B-rock

  • I bought iphone 5 in september last year and the whatsapp which I installed was free of cost.The number which I used is the one I was using in my android phone and validity for its expiring in april but for other users its lifetime free.how can I get it ?

    I bought iphone 5 in september last year and the whatsapp which I installed was free of cost.The number which I used is the one I was using in my android phone and validity for its expiring in april but for other iphone users its lifetime free.how can I get the lifetime free validity?

    kratigupta wrote:
    how can I get the lifetime free validity?
    Huh? AFAIK, such does not exist. Read here:
    http://www.whatsapp.com/faq/general/23014681

  • So how can I use my iPhone or stream music on the ATV without having use of the computer?. I am limited I have wifi iPhone ATV and hd TV. My ATV has a setting for AirPlay as well. Please help :)

    So how can I use my iPhone or stream music on the ATV without having use of the computer?. I am limited I have wifi iPhone ATV and hd TV. My ATV has a setting for AirPlay as well. Please help :)

    Use AirPlay.

  • The iphone cannot be used because the apple mobile device service is not started.       how do i fix this

    the iphone cannot be used because the apple mobile device service is not started how do i fix this

    Is this a Windows error?  If so, make sure you have the latest version of iTunes installed.  If you do, try reinstalling iTunes.  If that doesn't work, try manually starting the service.

  • How many columns can be used in the SELECT Statment

    Hi all,
    How many columns can be used in the SELECT statement?
    Ex: SELECT x1,x2,....xn FROM <table_name>;
    Thanks,
    GowriShankar.N

    Let me join ;-)
    SQL> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for Linux: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    SQL> DECLARE
      2  l_sql varchar2(32000);
      3  begin
      4  l_sql := 'CREATE TABLE T(';
      5  for i in 1..999 loop
      6  l_sql := l_sql ||'C'||i||' NUMBER,
      7  ';
      8  end loop;
      9  l_sql := l_sql||'C1000 NUMBER)';
    10  EXECUTE IMMEDIATE l_sql;
    11  end;
    12  /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from cols where table_name = 'T';
      COUNT(*)
          1000
    SQL> insert into t(c1) values(1);
    1 row created.
    SQL> select *
      2  from t t1,t t2;
            C1         C2         C3         C4         C5         C6         C7         C8         C9       
    ...   snipped
    C991        C992       C993       C994       C995       C996       C997       C998       C999         C1         C2         C3       C4         C5         C6         C7         C8         C9        C10       
    ...   snipped
    C990       C991       C992       C993    C994        C995       C996       C997       C998       C999
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------          1
                                                                                                                                        1
    SQL>
    SQL> select count(*) from (
      2  select * from t t1,t t2)
      3  ;
    select * from t t1,t t2)
    ERROR at line 2:
    ORA-01792: maximum number of columns in a table or view is 1000Obviously, inline view is obliged the same restrictions as a view, but select list is not constrained.
    Best regards
    Maxim

  • After updating to iTunes 5, I got an error message said the iPhone cannot be used because the Apple Moble Device service is not started. Any idea why and how to fix this? Thanks!

    After updating to iTunes 5, I got an error message said the iPhone cannot be used because the Apple Moble Device service is not started. Any idea why and how to fix this? Thanks!

    Please follow this article:
    http://support.apple.com/kb/TS1567
    it should help
    let me know

  • I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email

    I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email.

    Settings > iTunes & App store.
    Tap AppleID, sign out then sign back in.
    The Apple ID is right everywhere else. I've synced the phone. I've reset it in Settings on the phone. I've changed it at Apple.
    When you write, "I've changed it at Apple, this means you updated yoru old AppleID or you ceated a new AppleID?

  • How do I connect and use a travel drive

    How do I connect and use a travel drive

    I don't believe you can, but there are free services out there, such as dropbox that can accomplish much the same thing.

  • I am trying to get my ipod to work and when i plug my ipod in to my computer with i tunes on i get the message " the ipod cannot be used because the mobile device service is not started" what does this mean

    I got the message "the ipod cannot be used because the mobile device service is not started"...when i plugged my ipod in with itunes running

    I'd start with the following document with that one:
    iPhone, iPad, iPod touch: How to restart the Apple Mobile Device Service (AMDS) on Windows

Maybe you are looking for

  • SAP BI 7.3 Analysis authorization transport log

    Hi,    We have transported a Analysis authorization to production system, I would like to know the exact changes moved through this transport carrying a particular analysis authorization. The issue here is RSECVAL_CL has not recorded the changes done

  • Internet Browsers Don't Work

    I have a G5 iMac PowerMac 1.8 gHz (see system info from System Profiler below). For the past couple of months, I am unable to load a web browser in any web browsing application. This is true even though I am able to access the internet in AOL (to che

  • How can I reset my iCloud password when It's hacked?

    Someone hacked my iCloud. I tried to get the password back but i forgot one of my security questions. I thought "I'll just make a new iCloud and sign out of the old one". Well, I put the "Find my ipod" app on it and I can't sign out with out the pass

  • Runtime Error while executing SAP Std Pgm as per note no - 64490

    Hi, I'm executing SAP Std Pgm RKEAGENV(It reorganizes the TVDIR entries and the maintenance modules) as per OSS Note 64490. This program is giving dump as given below: Short text     Error when importing object "FIELDTAB". What happened?     Error in

  • DVD STUDIO PRO 2 SETUP/CONFIG

    Hey Gang, New to this forum and I need some advice. I have DVD Studio Pro 2 and have just downloaded the updates from the Pro download page (DVDSP 2.05, etc). I'm running OSX 10.2.8, w/768Ram, 60gb free HD space. iMovie 4.01 (I have FCP 2.X but never