How to use the current connection when calling db procedure ?

dear all,
Am using Jdevleoper 11.1.1.3 ,
I have a java class that call a database procedure , now everything is going fine with me but a bit slow bcoz am openning a new connection I think it would be definitely faster if am using the current connection
so how can i re-write my code so i can use the current connection istead of defining a new connection to the DB :
public void DeleteApp (int PAppNo){
String username,password,thinConn;
username = "ACC";
password = "ACC";
thinConn = "jdbc:oracle:thin:@..."
try {
DriverManager.registerDriver(new OracleDriver());
Connection conn = DriverManager.getConnection(thinConn, username, password);
CallableStatement cs = conn.prepareCall(" { call myprocedure(?,?,?) } ");
cs.setInt(1,PAppNo);
Thanks for all,
Lama

Delta,
You shound NOT be doing JDBC calls from your UI project. You should put the code as a service method in your application module, expose the service method to the client, and then call it through the binding layer from your UI http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcservices.htm#sm0212
thx John & timo but u always post the same reply at the same time for my questionsTimo and I have been around long enough that we recognize the questions that have been posted 9,461,293,811 times before and know the stock answers, and know where in the documentation the answers are given. As you appear to be new to ADF, I'd strongly recommend reading the Fusion Developer's Guide (skim it once and then read in detail the parts that interest you). As I've said before, so many of the basic (and not-so-basic) concepts are covered in there. Once you've skimmed it in enough detail, then the next time you have a problem, you might not know the answer, but you'll remember, "ah, I think I read something about that before, let me check..."
John

Similar Messages

  • How to used the internet connection adsl on my com...

    how to used the internet connection adsl on my computer by nokia n73 me
    i whant used the adsl connection in nokia n73 me by Bluetooth or cable
    and thank you

    Hi Theo,
    There are several ways to implement this using simple timing features of LabVIEW.  Two fairly simple methods are comparing system time stamps or using the Wait VI provided in the Timing palette.  The time stamp comparison requires a little bit more programming, but can be included in your main program loop.  To use the Wait function, you will probably need to construct a new loop parallel to your main loop.  I have attached screenshots of these two implementations.  Please let me know if you have any more questions.
    Donovan
    Attachments:
    WaitDelay[1].Png ‏5 KB
    TimeStampFalse.Png ‏11 KB
    TimeStampTrue.Png ‏11 KB

  • How to Select the Current Row When Using af:iterator?

    Hello all,
    I encounter the following problem when using af:iterator to display data from
    a View Object:
    When trying to display the content of a row via a popup, only the first row is
    returned no matter which row is selected. So a selection of the current row
    should exist or some other method which should allow the access to the
    current row.
    The af:table has a selectionListener attribute which permit to achieve this.
    Does anyone know about some similar attribute or some method for
    selecting the current row when the af:iterator is used?
    Thank you,
    Mirela

    I would be interested in the answer to this basic question as well. I cannot get the selected row value of an attribute in an iterator for a view if I simply set-up a attribute binding to the iterator. It seems that this should be possible. I've had no other option but to obtain the current row and the related attributes programmatically. This works fine, but if there is a more elegant option, then I'd certainly like to use it.
              <af:table value="#{bindings.CompaniesView1.collectionModel}"
                            var="row"
                            rows="#{bindings.CompaniesView1.rangeSize}"
                            emptyText="#{bindings.CompaniesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.CompaniesView1.rangeSize}"
                            selectedRowKeys="#{bindings.CompaniesView1.collectionModel.selectedRow}"
                            rowBandingInterval="0" id="tCompanies"
                            summary="Companies"
                            width="100%"
                            rowSelection="single"
                            binding="#{CompanyBackingBean.companiesTable}">Page Def:
        <attributeValues IterBinding="CompaniesView1Iterator" id="Id">
          <AttrNames>
            <Item Value="Id"/>
          </AttrNames>
        </attributeValues>I should be able to get the Id attribute value of the current selected row using "#{bindings.Id}", right? Well, it doesn't work for me. Any ideas?
    Thanks

  • How to verify the current connections on a firewall?

    I am a new computer support specialist in a small company. We would like to focus on network security. How can I verify the current connections on a PIX firewall? We would like catch malicious behavior while it's occurring. How do I inspect all the connections going through our firewall - both in and out. My focus is on anomalies and investigate them; this could include outbound FTP or inbound Telnet/SSH sessions. We have a Cisco perimeter router, which functions as the company firewall. A PIX firewall sits behind the router and its sole function is to build and terminate IPSEC tunnels. I would appreciate any advise.
    Thanks.
    Said

    Hi Said
    "sh crypto isa sa" will show all the IPSEC phase 1 connections to your pix.
    "sh crypto ipsec sa" will show all the IPSEC phase 2 connections to your pix.
    "sh conn" will show all the connections that have been allowed through your pix.
    HTH
    Jon

  • How to use the current view in script logic - %DIMENSIONNAME_SET% not work

    Hello,
    I have the requirement to use the values from the current view in the script logic. User would like to use the members which were selected from the current view in the calculation.
    We are using SAP BPC 7.0 SP06
    I have prepared the following scrpit:
    *XDIM_MEMBERSET TIME=$YEARS001$.NA
    *XDIM_MEMBERSET ACCOUNT=BAS(PLVEH_EXP)
    *SELECT(%CBU%,ID,BUSINESSAREA,[ID]='%BUSINESSAREA_SET%'")
    *SELECT(%CIO%,ID,INTERNALORDER,[ID]='%INTERNALORDER_SET%'")
    *RUNALLOCATION
    *FACTOR=USING
    *DIM BUSINESSAREA WHAT=BANA;WHERE=%CBU%;USING=<<<
    *DIM INTERNALORDER WHAT=IONA;WHERE=%CIO%;USING=<<<
    *DIM INDICATORS WHAT=INVEHPRI;WHERE=INPXQ;USING=INVEHQUA
    *ENDALLOCATION
    I have read in the sdn that it is possible to get the current values using %DIMENSIONNAME_SET% variable and use it but it returns all the members that were selected in the datapackage.
    I would like to know if there is any special consideration regarging the use of variable or if there is another way to solve it.
    Thanks in advance.

    Hi,
    If you want the code to be executed for the current view selected, you can place the code in Default logic which executes the logic for what ever current view values you send the data through Input schedule.
    The key word you have mentined is for script running through Data Manager which gets the value selected through user promt.
    Hope this helps,
    Regards,
    G.Vijaya Kumar.

  • How to display the current name when renaming Finder item

    Is there any way to get Automator to display the current name of a Finder item when renaming an item?
    I want my users to be able to copy and rename a folder template but I want to display the folder template's current name as a default in the renaming dialogue window, so the user follows the correct naming format.

    Since you've already hacked into it, if you've got developer tools installed, it is most likely in the nib file that is in the English project folder in the Resources.
    I don't know what further implications that will have on the app in general, though.
    If you are a little adept at applescript, you may want to create your own Applescript Studio app to do this instead of Automator. Also, take a look at Platypus to make a wrapper around you applescript instead of AS Studio.
    Message was edited by: Barney-15E

  • How to use the camera connection kit for iPad 3rd generation?

    Hi I just bought a new camera connection kit for my iPad 3rd generation. Does anyone have any experience or knows how to use it? I tried to connect a USB to it and nothing happened. Please help...

    This is how you use it.

  • How to refresh the current page when retrieving data from database

    hi all
    in my application i want to navigate from different tables to different forms.  The data in the table and in the forms is comming fromthe database. when i select a navigation link to database of a form it is connecting to database.  so im manually refreshing the refresh button of I.E. which is big headache.  so is there any way to refresh my current table or form dynamically at run time to retrieve from database
    Thanks and regards
    khaja

    Hi,
      Refreshing a connection to Database means re establishing your connection each time.It will be load for the DB to load the data every time generally not advisable to do.
      Inorder to get the value from the DB you have load the driver and connect it using fireplug with the view for navigations.
      for the same refer this link.
    http://help.sap.com/saphelp_erp2004/helpdata/en/51/2c747ecd037842943bdb38be214719/frameset.htm
    Hope it helps.
    Rdgs,
    Guru

  • How to use the database connection bean??

    hi,
    i was created a database connection class. can teach me how to call the class at JSP.
    thanx...
    <jsp:useBean id ="dat" class ="Database" scope ="request"/>
         String sql = "INSERT INTO  table"
               "(standard,col )" +
               " VALUES " +
                                                "('a','kk')";
         public static Connection getConnection()
             throws ClassNotFoundException, SQLException
              // Load Sun's JDBC-ODBC Bridge
              Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
              // Make a connection to JDBC-ODBC Bridge drive with
              // the connection URL, jdbc:odbc:DSN
              String url =  "jdbc:odbc:miniproj";
              return(DriverManager.getConnection(url, "anonymous", "guest"));
         public static int executeUpdate(String nonSelectQuery)
             throws ClassNotFoundException, SQLException
              return(executeUpdate(getConnection(), nonSelectQuery));
         public static int executeUpdate(Connection conn, String nonSelectQuery)
             throws ClassNotFoundException, SQLException
              return(conn.createStatement().executeUpdate(nonSelectQuery));
         }

    NOTE that you should always have your classes inside packages. Some versions of Tomcat won't use them correctly otherwise.

  • How to use the SSO functionality when a button is clicked in Adobe Form?

    I have an offline interactive form - when the user clicks on a SUBMIT to SAP button, it asks for user id and password.
    However he user does not have a password to log into SAP directly - he will be logging in via Single Sign On.
    Can you please advise on how to achive this functionality?
    1. Click on a SUBMIT to SAP button on the Adobe Form
    2. Take this info and get the Single Sign On token from SAP portal
    3. Use this ticket/token and log into SAP ECC or validate this info within SAP ( for this 3rd step - probably use function module SUSR_CHECK_LOGON_DATA?)
    Thanks

    Hi
      I think you want to know the row number, in this case , what i would suggest is , in the action ,there is a parameter WDEVENT , which gives you the complete row where you clicked.
    In WDEVENT , you have GET_CONTEXT_ELEMENT method as well as GET_DATA method to fetch the data and it doesnt require any lead selection.
    Thanks
    Anzy

  • How to use the readLine()  method when reading data from a URL?

    Hello,
    I have a URL which contains text input.
    The only way to get the data from this URL is by opening a URL connection to it.
    I would like to get the data from this URL but at the same time I would like to be able to use readLine() method of BufferedReader in order to read the data line by line.
    My question is how do I combine between these two requirements in order to reed the data from the URL?
    Roy

    Hello Roy,
    can you try out this code.
      URL yahoo = new URL("http://www.yahoo.com/");
            URLConnection yc = yahoo.openConnection();
            BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    yc.getInputStream()));
            String inputLine;
            while ((inputLine = in.readLine()) != null)
                System.out.println(inputLine);
            in.close();
    Regards,
    Mohan R

  • How to use the Portal Connection Service in a standard J2EE application

    Hi,
    We want to use portal connection service to connection backgend system from a standard j2ee application.
    But the connection need a connectionProperties object which is created in this way:
    ConnectionProperties connectionProperties =
    new ConnectionProperties(
    request.getLocale(),
    request.getUser());
    Because the "request" object is IPortalComponentRequest object, which is a portal object. In our standard application, we can use this way.
    So how?
    Thanks and Best Regards,
    Xiaoming Yang

    Does anybody has any idea? Many thanks and points will definitely be awarded.
    Best Regards,
    Xiaoming

  • I want to know how to change it so when i open a folder full of bookmarks it uses the current bookmark as the first of the group again.

    Before updating from version 7 to 8 when i went into my bookmarks, and right clicked on a folder and clicked "Open All In Tabs" it would use the current bookmark that i had open as the first of these in the folder. It would then open the folder's bookmarks to the right of that current bookmark.
    I can accept that it no longer opens the group to the right of the current tab easily enough. What annoys me is that it no longer uses the current tab to open the bookmarks. I would like to know how to change this option.

    browser.tabs.loadFolderAndReplace
    :browser.link.open_newwindow
    :browser.search.openintab
    references:
    * http://kb.mozillazine.org/Browser.tabs.loadFolderAndReplace
    * http://kb.mozillazine.org/About:config_entries
    * http://dmcritchie.mvps.org/firefox/tabs_config.htm
    *http://www.x2b4.com/howto/how-to-open-everything-url-search-bookmarks-in-a-new-tab-with-firefox-3/

  • Iphone 4s - how do I change the name in the contacts for the owner of the phone - it is coming up as the other person who uses the laptop - so when ringing or texting anyone 2 names are being used as the caller id on the screen

    Iphone 4s - how do I change the name in the contacts for the owner of the phone - it is coming up as the other person who uses the laptop - so when ringing or texting anyone 2 names are being used as the caller id on the screen

    *Ralph Johns* writes:
    "Your options are:
    Get a trial account form @mac which will work as an iChat name after the 60 days run out but not be a email account that is valid (And is free)"
    Do you mean a trial account from .Mac? (DotMac)
    "Get an AIM Screen name and set it to Display what you want as you set it up.
    The Screen name can be whatever yu want but you can also set it to display something else as well."
    I had thought about this, but it seems other people have already chosen the screen name "pinksharkmark" and virtually every variation of it I can think of. So that isn't an option for me. As for getting it to display something else as well, do you mean that if I were to get an AIM screen name like "CromulentCat" I could somehow log in to iChat under the AIM account "CromulentCat" yet get iChat to represent me to my Buddies as "PinkSharkMark"? Because I have to admit I don't see how that can be done. It appears as if iChat displays to anyone chatting with you precisely the account name you logged in under and nothing else. So if you logged in using a .Mac account, then you are displayed as "[email protected]" while if you logged in under an AIM account, you are displayed as "CromulentCat". But that's it that's all... there is no way to change CromulentCat to PinkSharkMark.
    Thanks very much for taking the time to reply, though.

  • HOW TO TRACE THE PLSQL API BEING CALLED WHEN WE USE FORM

    Dear ALL,
    How I can track the PLSQL API name when we press any button in form.
    For example when I click on Bill By Requirement button on EAM Work Order Billing FORM , how will I know which PLSQL API is being called.
    Please give me an idea about how to identify the PLSQL API being called.
    Thanks and Regards,
    Lavan

    Please refer to (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
    Thanks,
    Hussein

Maybe you are looking for