I need to get an array list from a databse

Hi guys,
I want to do a graph using jsp and it works if the array is pre-determined. But i wanna dynamically generate an array from the database records. Is it possible and if so...may i know how to implement that.
Please reply as soon as possible.. coz i it quite urgently
Thank you.
Regards,
Ct'zen

The FormattedDataSet API has a simple class that converts from a ResultSet to a 2 dim array.
ResultSetConverter rsc=new ResultSetConverter(resultSet);
// Here are all the methods available in the ResultSetConverter.
Object[][] data=rsc.getResultSet();
String[] header=rsc.getMetaData();
int rows=rsc.getRowCount();
int cols=rsc.getColCount();
boolean empty=rsc.isEmpty();
/* Other methods are available that allow you do return ResultSetConverters without interacting with jdbc at all.  For example note in the code below there is no opening/closing of Connections, Statements, and ResultSets.  In addition behind the scenes all jdbc calls are monitored with JAMon.
DataAccess da=new DataAccessJ2EE("MyDataSource");
rsc=da.getResultSetConverter("select * from table");steve - http://www.fdsapi.com - The easiest way to generate dynamic content in java, including xml and html

Similar Messages

  • I recently lost my iPhone, how do i get my contact list from my last back up on iTunes into my android phone in the meantime before i get a new iPhone?

    My iPhone was recently stolen and i had all my contact phone number which i need quite urgently on the spare android phone am using in the in, how do i get my contact list from my last back up on iTunes into my android phone in the meantime before i get a new iPhone?

    Hi If you have them on your PC, just copy them and you will need to enter, each one on Android phone by typing, them in. Cheers Brian

  • I have a Verizon LG Versa cell phone, how do I get my contact list from there to my new iphone 4?

    I have a Verizon LG Versa cell phone, how do I get my contact list from there to my new iphone 4?

    Matt,
       My new iPhone 4 is on the way from Verizon, and I too am moving on from the LG Versa (a poor man's iPhone) so I've researched this.  I trust you have been using the backup assistant on the LG phone to backup your contacts?  If so, and you investigate the app store you will see an app for doing the same task on you new iPhone.  Initially it will take you LG contacts you have backed up at Verizon to their new home on the iPhone.
    According to user comments there appear to be a couple of issues with the app you need to be aware of:
       1.  It will not automatically backup your iPhone, you will need to initiate updates in the future on your own.  and
       2.  You will see in the comments, that there have been some issues with length of backup when you add lots of contact photos to your list.
       This coupled with the address book sync from your computer should make your list whole, in fact the move to the iPhone will allow me to consolidate my address book with my cell phone contacts.  Then once I remove the duplicates all will be right with the world.
    Steve

  • My iphone has been water damaged and in the mean time ive gone back to using my old phone. But i need to get all the contacts from my iphone i had synced to my laptop, but i don't know where to find them and im not sure if ive backed them up to anything!

    my iphone has been water damaged and in the mean time ive gone back to using my old phone. But i need to get all the contacts from my iphone i had synced to my laptop, but i don't know where to find them and im not sure if ive backed them up to anything!

    If your contacts are synced to your computer then they are in the supported app you are syncing with.
    When you set up syncing of contacts on your device, which application did you select? 

  • How can I get my contact list from my I phone 5 to my I pad?

    how can I get my contact list from my I phone 5 to my I pad air?

    One way is via iCloud. Settings > iClouds > Contacts on for both.

  • HT1386 I need help getting my contacts transferred from my old phone to my new one

    I need help getting my contacts transferred from my old iphone to my new one

    Either backup the contacts in iCloud or with a compatible programme on your computer (Outlook, Windows Contacts, Address Book etc).
    Once done, sync the contacts to your new iPhone from that programme/iCloud.
    Read "Contacts"
    http://support.apple.com/kb/HT1296
    http://support.apple.com/kb/HT4859

  • HT1386 I want to give me old iphone 4 to my daughter and need to get all her info from her old iphone onto a new computer.  The PC she synced with is dead and she does not want to loose all her contacts and music.

    I want to give my old iphone 4 to my daughter and need to get all her info from her old iphone 3 onto a new computer.  The PC she synced with is dead and she does not want to loose all her contacts and music. How can I do this?

    To effectively transfer ownership of the iPhone requires that it be "restored" as a new device.
    ...  The PC she synced with is dead
    The iPhone is not a backup device. Your computer backs up the iPhone, not the other way around. What you use to back up your computer is up to you - Macs use Time Machine. I assume PCs use something similar.
    If her PC backup is dead you will have difficulty extracting content from the iPhone since it is not designed to work that way.
    All her Apple purchases can easily be transferred to another iPhone. However, her contacts will be gone, as will any music or other contact obtained from sources other than Apple.
    There are a number of third party utilities that claim to be able to extract content from an iPhone. See wjosten's procedure here:
    https://discussions.apple.com/docs/DOC-3141

  • Trying to get my contact list from Outlook Express to fly over to my new iPAD. Appreciate any suggestions.

    Trying to get my contact list from Outlook Express to fly over to my new iPAD.  Will appreciate any suggestions.

    Outlook Express accesses an address book app called Windoze Contacts for contact info, which the iPad supports syncing contacts with. This is selected under the Info tab for your iPad sync preferences with iTunes.

  • I get recent contact lists from another device

    I get recent contact lists from another device. I have two iPhones on my account and this is the first time I have ever shared recent contacts from separate contact lists.

    Please elaborate.

  • Accessing an Array List from another class

    Hi, I was a member on here before, but I forgot my password and my security question is wrong.
    My question is how do I access a private arraylist from a different class in the same package?
    What I am trying to do is the following (hard to explain).
    Make a picking client for a shop, so that when an order is recieved, the picker can click on the orders button, and view all of the current orders that have not been completed. This Pick client has its own user interface, in a seperate class from where the BoughtList array is created, in the cashier client. The boughtlist is created when the cashier puts in the product number into the cashier client and clicks buy. I seem to be having trouble accessing the list from another class. Once the order is completed the cashier clicks bought and the list is reset. There is another class in a different pagage that processes some of the functions of the order, eg newOrder().
    Yes it is for Uni so I dont need / want the full answers, jist something to get started. Also please dont flame me, I have done many other parts of this project, just having trouble getting started on this one.
    Here is the code for the cashier client. The code for the Pick client is almost the same, I just need to make the code that displays the orders.
    package Clients;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.text.NumberFormat;
    import java.util.Locale;
    import Catalogue.*;
    import DBAccess.*;
    import Processing.*;
    import Middle.*;
    class CashierGUI 
      class STATE                             // Cashier states
        public static final int PROCESS  = 0;
        public static final int CHECKED  = 1;
      class NAME                             // Names of buttons
        public static final String CHECK  = "Check";
        public static final String BUY    = "Buy";
        public static final String CANCEL = "Cancel";
        public static final String BOUGHT = "Bought";
      private static final int H = 300;       // Height of window pixels
      private static final int W = 400;       // Width  of window pixels
      private JLabel      theAction  = new JLabel();
      private JTextField  theInput   = new JTextField();
      private JTextArea   theOutput  = new JTextArea();
      private JScrollPane theSP      = new JScrollPane();
      private JButton     theBtCheck = new JButton( NAME.CHECK );
      private JButton     theBtBuy   = new JButton( NAME.BUY );
      private JButton     theBtCancel= new JButton( NAME.CANCEL );
      private JButton     theBtBought= new JButton( NAME.BOUGHT );
      private int         theState   = STATE.PROCESS;   // Current state
      private Product     theProduct = null;            // Current product
      private BoughtList  theBought  = null;            // Bought items
      private Transaction     theCB        = new Transaction();
      private StockReadWriter theStock     = null;
      private OrderProcessing theOrder     = null;
      private NumberFormat theMoney  =
              NumberFormat.getCurrencyInstance( Locale.UK );
      public CashierGUI(  RootPaneContainer rpc, MiddleFactory mf  )
        try                                             //
          theStock = mf.getNewStockReadWriter();        // DataBase access
          theOrder = mf.getNewOrderProcessing();        // Process order
        } catch ( Exception e )
          System.out.println("Exception: " + e.getMessage() );
        Container cp         = rpc.getContentPane();    // Content Pane
        Container rootWindow = (Container) rpc;         // Root Window
        cp.setLayout(null);                             // No layout manager
        rootWindow.setSize( W, H );                     // Size of Window
        Font f = new Font("Monospaced",Font.PLAIN,12);  // Font f is
        theBtCheck.setBounds( 16, 25+60*0, 80, 40 );    // Check Button
        theBtCheck.addActionListener( theCB );          // Listener
        cp.add( theBtCheck );                           //  Add to canvas
        theBtBuy.setBounds( 16, 25+60*1, 80, 40 );      // Buy button
        theBtBuy.addActionListener( theCB );            //  Listener
        cp.add( theBtBuy );                             //  Add to canvas
        theBtCancel.setBounds( 16, 25+60*2, 80, 40 );   // Cancel Button
        theBtCancel.addActionListener( theCB );         //  Listener
        cp.add( theBtCancel );                          //  Add to canvas
        theBtBought.setBounds( 16, 25+60*3, 80, 40 );   // Clear Button
        theBtBought.addActionListener( theCB );         //  Listener
        cp.add( theBtBought );                          //  Add to canvas
        theAction.setBounds( 110, 25 , 270, 20 );       // Message area
        theAction.setText( "" );                        // Blank
        cp.add( theAction );                            //  Add to canvas
        theInput.setBounds( 110, 50, 270, 40 );         // Input Area
        theInput.setText("");                           // Blank
        cp.add( theInput );                             //  Add to canvas
        theSP.setBounds( 110, 100, 270, 160 );          // Scrolling pane
        theOutput.setText( "" );                        //  Blank
        theOutput.setFont( f );                         //  Uses font 
        cp.add( theSP );                                //  Add to canvas
        theSP.getViewport().add( theOutput );           //  In TextArea
        rootWindow.setVisible( true );                  // Make visible
      class Transaction implements ActionListener       // Listener
        public void actionPerformed( ActionEvent ae )   // Interaction
          if ( theStock == null )
            theAction.setText("No conection");
            return;                                     // No connection
          String actionIs = ae.getActionCommand();      // Button
          try
            if ( theBought == null )
              int on    = theOrder.uniqueNumber();      // Unique order no.
              theBought = new BoughtList( on );         //  Bought list
            if ( actionIs.equals( NAME.CHECK ) )        // Button CHECK
              theState  = STATE.PROCESS;                // State process
              String pn  = theInput.getText().trim();   // Product no.
              int    amount  = 1;                       //  & quantity
              if ( theStock.exists( pn ) )              // Stock Exists?
              {                                         // T
                Product pr = theStock.getDetails(pn);   //  Get details
                if ( pr.getQuantity() >= amount )       //  In stock?
                {                                       //  T
                  theAction.setText(                    //   Display
                    pr.getDescription() + " : " +       //    description
                    theMoney.format(pr.getPrice()) +    //    price
                    " (" + pr.getQuantity() + ")"       //    quantity
                  );                                    //   of product
                  theProduct = pr;                      //   Remember prod.
                  theProduct.setQuantity( amount );     //    & quantity
                  theState = STATE.CHECKED;             //   OK await BUY
                } else {                                //  F
                  theAction.setText(                    //   Not in Stock
                    pr.getDescription() +" not in stock"
              } else {                                  // F Stock exists
                theAction.setText(                      //  Unknown
                  "Unknown product number " + pn        //  product no.
            if ( actionIs.equals( NAME.BUY ) )          // Button BUY
              if ( theState != STATE.CHECKED )          // Not checked
              {                                         //  with customer
                theAction.setText("Check if OK with customer first");
                return;
              boolean stockBought =                      // Buy
                theStock.buyStock(                       //  however
                  theProduct.getProductNo(),             //  may fail             
                  theProduct.getQuantity() );            //
              if ( stockBought )                         // Stock bought
              {                                          // T
                theBought.add( theProduct );             //  Add to bought
                theOutput.setText( "" );                 //  clear
                theOutput.append( theBought.details());  //  Display
                theAction.setText("Purchased " +         //    details
                           theProduct.getDescription()); //
    //          theInput.setText( "" );
              } else {                                   // F
                theAction.setText("!!! Not in stock");   //  Now no stock
              theState = STATE.PROCESS;                  // All Done
            if ( actionIs.equals( NAME.CANCEL ) )        // Button CANCEL
              if ( theBought.number() >= 1 )             // item to cancel
              {                                          // T
                Product dt =  theBought.remove();        //  Remove from list
                theStock.addStock( dt.getProductNo(),    //  Re-stock
                                   dt.getQuantity()  );  //   as not sold
                theAction.setText("");                   //
                theOutput.setText(theBought.details());  //  display sales
              } else {                                   // F
                theOutput.setText( "" );                 //  Clear
              theState = STATE.PROCESS;
            if ( actionIs.equals( NAME.BOUGHT ) )        // Button Bought
              if ( theBought.number() >= 1 )             // items > 1
              {                                          // T
                theOrder.newOrder( theBought );          //  Process order
                theBought = null;                        //  reset
              theOutput.setText( "" );                   // Clear
              theInput.setText( "" );                    //
              theAction.setText( "Next customer" );      // New Customer
              theState = STATE.PROCESS;                  // All Done
            theInput.requestFocus();                     // theInput has Focus
          catch ( StockException e )                     // Error
          {                                              //  Of course
            theOutput.append( "Fail Stock access:" +     //   Should not
                                e.getMessage() + "\n" ); //  happen
          catch ( OrderException e )                     // Error
          {                                              //  Of course
            theOutput.append( "Fail Order process:" +    //   Should not
                                e.getMessage() + "\n" ); //  happen
    }

    (disclaimer: I did not read through your Swing code, as I find that painful)
    My question is how do I access a private arraylist from a different class in the same
    package?Provide a public accessor method (getMyPrivateArrayList())

  • Getting error while trying to get pending approval list from SOA server

    Hi,
    I have followed the steps mentioned in the following post to get the pending approval list from SOA server using java api's :
    Using Java APIs for Oracle Human Workflows | Oracle Technologies Premier
    But when I am running the java program I am getting the following error :
    java.io.InvalidClassException: oracle.bpel.services.common.exception.ServicesException; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -2263933888849127134
    Please let me know how to solve this issue.
    Thanks

    You would need to spcify the JNDI path in a properties file or the like.
    Suggestions here should help -
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial

  • !!! I need to get the return value from a PL/SQL in Java.. How??? !!!

    Hi
    -- I have a PL/SQL in which it return an array value and I need to get the value using Java.... any idea how?
    thanks

    Check out CallableStatement:
    http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html

  • How to get a filename list from a website?

    Hi,Everybody!
              I want get filename list form a dirctory in a website:
              For example:
              There's a website is: http://www.otherweb.com , there's some files like
              this: http://www.otherweb.com/dir/001.html
              http://www.otherweb.com/dir/002.html
              http://www.otherweb.com/dir/abc.html
              http://www.otherweb.com/dir/ffe.html
              So how can I get all the filename from the directory "dir"?
              like 001.html,002.html,abc.html,ffe.html....
              How can I do? Which class and method I can use?
              Thanks
              Catherine
              

              check out www.servlets.com.
              They have a servlet which can upload files from a remote machine
              to a directory on your web server.
              "Catherine" <[email protected]> wrote:
              >Hi,Everybody!
              >
              >I want get filename list form a dirctory in a website:
              >
              >For example:
              >
              >There's a website is: http://www.otherweb.com , there's some files like
              >this: http://www.otherweb.com/dir/001.html
              > http://www.otherweb.com/dir/002.html
              > http://www.otherweb.com/dir/abc.html
              > http://www.otherweb.com/dir/ffe.html
              > ......
              >So how can I get all the filename from the directory "dir"?
              >
              >like 001.html,002.html,abc.html,ffe.html....
              >
              >How can I do? Which class and method I can use?
              >
              >Thanks
              >
              >Catherine
              >
              >
              >
              >
              

  • Need to get address/contact info from old computer

    Can anyone help me here?  I have a backup of my old palm directory on my new computer, and it has an address.bak, address.dat, and UiPrefs.dat.  
    I can open either the address.bak and address.dat file in notepad, and see the raw text (with lots of extraneous characters).  But I need to get this into a csv format, or something else that I can import into excel.
    I tried downloading the palm desktop (v. 4.1.4) onto this machine, and importing the address into there, but the only options for import are ABA (address archive), csv, txt, or vcard.
    How can I convert my dat or bak file into another format?
    thanks for any ideas!
    Sylvia
    Post relates to: Treo 650 (Sprint)

    Can anyone help me here?  I have a backup of my old palm directory on my new computer, and it has an address.bak, address.dat, and UiPrefs.dat.  
    I can open either the address.bak and address.dat file in notepad, and see the raw text (with lots of extraneous characters).  But I need to get this into a csv format, or something else that I can import into excel.
    I tried downloading the palm desktop (v. 4.1.4) onto this machine, and importing the address into there, but the only options for import are ABA (address archive), csv, txt, or vcard.
    How can I convert my dat or bak file into another format?
    thanks for any ideas!
    Sylvia
    Post relates to: Treo 650 (Sprint)

  • Need to get rss/xml feed from itunes

    I need to get an rss/xml feed of the albums I am selling on itunes -- to insert into an iphone app I am working on.
    Any one know how to get this feed?

    If you had iTunes Match before all this happened, yes. Just log in, activate iTM and download the music. If you did not have iTunes Match prior to these incidents, no, it can not help you.
    You should also be doing regular backups of your personal data to an extnal HDD. If you had a backup hue could simply restore it.

Maybe you are looking for

  • Red green and yellow buttons

    Could someone explain how the three buttons in upper left corner are suppose to work.I know that the red is to close out the current page.The yellow is to minimize down to dock.but the green I thought was to either shrink page size to user preference

  • Can we Pass two variable values in to one Varaible which is Cust Exit?

    Hi all, Can we pass two Variable values to a Variable which is Custexit?(For Example posting Period and the fiscalyear in to the FicalPeriod ) Regards Kiran

  • Dock Apps don't show if opened or closed

    My applications in the Dock don't have the little triangle to indicate if there open. Anyone else

  • Creating/running Terminal command with Automator

    I am using Parallels Desktop on my iMac. Occasionally after I shutdown Parallels Desktop/Windows the ram it used is not released back, for example, depending on what I'm running in Parallels Desktop I can use upto around 16GB or ram. Ocassionally whe

  • DVD drive is not configured in system profiler

    My dvd drive is not configured in the system profiler. This problem occurred when i inserted a dvd that couldnt be ejected or read by the dvd device. I tried every single way to eject the dvd but the dvd is still inside. Now, i have a dvd inside my d