Help with result set

hi guys help please..i have a code below that quiry from my database but im having problem is displaying the data from the JTextField & JLabel when i put this code
lblStudentID.setText(rs.getString(1));
                txtFName.setText(rs.getString(2));in the method btnSearchActionPerformed the data is displayed but when i put those code in my FuncSetValues() method the data won't display..Can you guys help me to figure out what is the problem...I think it has something to do with the ResultSet or the rs variable. Thanks in advance!
public static ResultSet rs;
private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {
        try{
            int c = 0;
            String searchArg = txtSearch.getText();
            String studName, mInitial;
            searchArg = searchArg.replace('*', '%');           
            con = FuncCreateDBConnection();
            cStmt = con.prepareCall("{call dbsample.usp_StudentInfo_SEARCH(?, ?)}");
            cStmt.setString("searchArg", searchArg);
            cStmt.setString("searchType", cmboSearchBy.getSelectedItem().toString());           
            rs = cStmt.executeQuery();           
            if (rs != null){
                listModel = new DefaultListModel();           
                lstSearchResult.setModel(listModel);
                while (rs.next()){                                      
                      mInitial = rs.getString(4).substring(0, 1).toUpperCase();
                      studName = rs.getString(3) + ", " + rs.getString(2) + " " + mInitial + ".";                     
                      listModel.addElement(studName);
                System.out.println("Rows:"+ rs.getString(2));                                                     
                      c++;
        catch(SQLException ex){
                javax.swing.JOptionPane.showMessageDialog(this, "SQL Exception!\r\nMessage: " + ex.getMessage(),"Search Student",JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();   
        catch (Exception ex){
                javax.swing.JOptionPane.showMessageDialog(this, "System Exception!\r\nMessage: " + ex.getLocalizedMessage(),"Add Student",JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
        finally{               
                try{con.close();} catch (SQLException ignoreThis){}
                try{cStmt.close();} catch (SQLException ignoreThis) {}
private void lstSearchResultValueChanged(javax.swing.event.ListSelectionEvent evt) {
    FuncSetValues();
void FuncSetValues(){       
        if (rs != null){
            try{         
                //txtFName.setText("daimous");
                //rs.first();
                int r = rs.getRow();               
                JOptionPane.showMessageDialog(this, "SETTING! Postion:");
                rs.absolute(lstSearchResult.getSelectedIndex());               
                lblStudentID.setText(rs.getString(1));
                txtFName.setText(rs.getString(2));
            catch (Exception ignoreThis){}           
}

I've found the error message and it says "java.sql.SQLException: Operation not allowed after ResultSet closed" since i close the connection & the statement in my finally clause
        finally{               
                try{con.close();} catch (SQLException ignoreThis){}
                try{cStmt.close();} catch (SQLException ignoreThis) {}
        } but im wondering why the ResultSet is also closed...Is there anyway for me to close the connection and statement without closing the ResultSet?

Similar Messages

  • Issue with result set of query

    I have the following tables:
    --soccer.soccer_optical_player_gm_stats
    --This is only sample data
    GAME_CODE    PLAYER_ID    NUMBER_OF_SPRINTS
    88884               84646                    55              
    88884               64646                    15  
    88884               55551                    35
    88884               88446                    10
    etc...--soccer.soccer_optical_team_gm_stats
    --This is only sample data
    GAME_CODE    TEAM_ID
    88884               13
    88884               13
    88884               15
    88884               13
    etc...--customer_data.cd_soccer_schedule
    --sample data
    GAME_DATE                     5/2/2009 7:30:00 PM
    GAME_CODE                     88884              
    GAME_CODE_1032                     2009050207
    HOME_TEAM_ID_1032              13
    HOME_TEAM_ID                     5360
    HOME_TEAM_NAME                     Los Angeles
    HOME_TEAM_NICKNAME             Galaxy
    HOME_TEAM_ABBREV                LA
    AWAY_TEAM_ID_1032              15
    AWAY_TEAM_ID                     5362
    AWAY_TEAM_NAME                     New York
    AWAY_TEAM_NICKNAME          Red Bulls
    AWAY_TEAM_ABBREV               RBSo using the tables above i'm trying to sum the number of sprints for each team and output it...
    With the following code:
    select          distinct
                     sch.game_date,
                     tm.team_id,
                     sch.game_code,
                     sch.game_code_1032,
                     sch.home_team_id_1032,
                     sch.home_team_id,
                     sch.home_team_name,
                     sch.home_team_nickname,
                     sch.home_team_abbrev,
                     sch.away_team_id_1032,
                     sch.away_team_id,
                     sch.away_team_name,
                     sch.away_team_nickname,
                     sch.away_team_abbrev,
                     home_tm_sprints,
                     away_tm_sprints
           -- bulk collect into distance_run_leaders
            from 
                     customer_data.cd_soccer_schedule sch,
                     soccer.soccer_optical_team_gm_stats tm,
                           select distinct
                                  sum(plyr.number_of_sprints) as home_tm_sprints,
                                  sch.game_code,
                                  sch.home_team_name,
                                  sch.away_Team_name,
                                  sch.game_code,
                                  rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_home
                           from
                                  soccer.soccer_optical_player_gm_stats plyr,
                                  soccer.soccer_optical_team_gm_stats tm,
                                  customer_data.cd_soccer_schedule sch
                           where  sch.season_id = 200921
                           and    tm.team_id = sch.home_team_id
                           and    sch.game_code = plyr.game_code
                           group by
                                  sch.game_code,
                                  sch.home_team_name,
                                  sch.away_Team_name,
                                  sch.game_code
                           order by rankings_order_home asc
                      ) home_team,
                        select distinct
                               sum(plyr.number_of_sprints) as away_tm_sprints,
                               sch.game_code,
                               sch.home_team_name,
                               sch.away_Team_name,
                               sch.game_code,
                               rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_away
                        from
                               soccer.soccer_optical_player_gm_stats plyr,
                               soccer.soccer_optical_team_gm_stats tm,
                               customer_data.cd_soccer_schedule sch
                        where  sch.season_id = 200921
                        and    tm.team_id = sch.away_team_id
                        and    sch.game_code = plyr.game_code
                        group by
                               sch.game_code,
                               sch.home_team_name,
                               sch.away_Team_name,
                               sch.game_code
                       order by rankings_order_away asc
                    ) away_team
            where    sch.game_code = tm.game_code
            and      sch.season_id = 200921Issues:
    1. The output above returns multiple entries(like 30 or so) for each game_code (i only want two entries returned for each game_code).
    --(Only difference between the two result sets is the team_id, which ultimatly lets me know if it a result for the home or away team)
    Something like:
    GAME_DATE                     5/2/2009 7:30:00 PM        5/2/2009 7:30:00 PM
    TEAM_ID                                13                                  15 
    GAME_CODE                     88884                             88884                  
    GAME_CODE_1032                     2009050207                    2009050207
    HOME_TEAM_ID_1032               13                                  13  
    HOME_TEAM_ID                     5360                               5360
    HOME_TEAM_NAME                     Los Angeles                      Los Angeles
    HOME_TEAM_NICKNAME           Galaxy                              Galaxy
    HOME_TEAM_ABBREV               LA                                   LA
    AWAY_TEAM_ID_1032             15                                   15
    AWAY_TEAM_ID                     5362                               5362
    AWAY_TEAM_NAME                     New York                        New York
    AWAY_TEAM_NICKNAME               Red Bulls                         Red Bulls
    AWAY_TEAM_ABBREV                  RB                                  RB
    HOME_TM_SPRINTS                    152                                152
    AWAY_TM_SPRINTS                   452                                 4522. In addition to that, I'm also having an issue trying to figure out how to do a general ranking...in the from clause i'd so a seperate ranking for just the home teams and just the away the teams. I can't seem to figure out how to merge the rankings into one, and just have one general ranking.
    Edited by: user652714 on May 7, 2009 4:18 PM
    Edited by: user652714 on May 8, 2009 7:14 AM

    ok maybe I just need to give you a better understanding of what i'm trying to ultimatly do, and maybe that will help clarify things.
    In the original code I posted the following subquery in the from clause...
    select distinct
                                  sum(plyr.number_of_sprints) as home_tm_sprints,
                                  sch.game_code,
                                  sch.home_team_name as home_team_name,
                                  sch.game_code,
                                  rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_home
                           from
                                  soccer.soccer_optical_player_gm_stats plyr,
                                  soccer.soccer_optical_team_gm_stats tm,
                                  customer_data.cd_soccer_schedule sch
                           where  sch.season_id = 200921
                           and    tm.team_id = sch.home_team_id
                           and    sch.game_code = plyr.game_code
                           group by
                                  sch.game_code,
                                  sch.home_team_name,
                                  sch.away_Team_name,
                                  sch.game_code
                           order by rankings_order_home asc the result set was this...
        HOME_TM_SPRINTS     GAME_CODE           HOME_TEAM_NAME                  GAME_CODE                  RANKINGS_ORDER_HOME
         576                 870988                New York                   870988                     1
         480                 870991                Chicago                 870991                     2
         435                 870945                 Chicago                 870945                     3
         416                 870983                 San Jose                 870983                     4
         402                 870961                 D.C.                 870961                     5
         322                 870972                 Columbus                 870972                     6
         236                 870957                 Columbus                 870957                     7
         215                 870986                 Kansas City                 870986                     8
         143                 870984                 Los Angeles                 870984                     9Here is the other subquery that i had originally posted:
      select distinct
                               sum(plyr.number_of_sprints) as away_tm_sprints,
                               sch.game_code,
                               sch.away_team_name away_team ,
                               sch.game_code,
                               rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_away
                        from
                               soccer.soccer_optical_player_gm_stats plyr,
                               soccer.soccer_optical_team_gm_stats tm,
                               customer_data.cd_soccer_schedule sch
                        where  sch.season_id = 200921
                        and    tm.team_id = sch.away_team_id
                        and    sch.game_code = plyr.game_code
                        group by
                               sch.game_code,
                               sch.home_team_name,
                               sch.away_Team_name,
                               sch.game_code
                       order by rankings_order_away ascResult rest:
       AWAY_TM_SPRINTS                    GAME_CODE                AWAY_TEAM        GAME_CODE           RANKINGS_ORDER_AWAY
         483                     870972                     Chicago                     870972                                1
         435                     870945                     New York                870945                           2
         430                     870986                     D.C.                     870986                                3
         429                     870984                     New York                870984                           4
         402                     870961                     New England            870961                             5
         384                     870988                     San Jose                870988                           6
         320                     870991                     New England            870991                             7
         208                     870983                     Chivas USA                870983                           8
         118                     870957                     Colorado                870957                           9Final output that I want/trying to get
    TM_SPRINTS  GAME_CODE    TEAM           GAME_CODE       RANKINGS_ORDER
    576          870988          New York          870988          1
    483          870972          Chicago          870972          2
    480          870991          Chicago          870991          3
    435          870945          Chicago          870945          4
    435          870945          New York     870945          4
    430          870986          D.C.          870986          6
    429          870984          New York     870984          7
    416          870983          San Jose     870983          8
    402          870961          D.C.          870961          9
    402          870961          New England     870961          9
    384          870988          San Jose     870988          11
    322          870972          Columbus     870972          12
    320          870991          New England     870991          13
    236          870957          Columbus     870957          14
    215          870986          Kansas City     870986          15
    208          870983          Chivas USA     870983          16
    143          870984          Los Angeles     870984          17
    118          870957          Colorado     870957          18The above is what i'm going for...but if it's to difficult to merge the columns into one (instead of having a seprate column for home_team_* and away_team_* that's fine to.
    Edited by: user652714 on May 11, 2009 9:04 AM

  • Please help - Scrollable result set in sql server 2000

    Hi can some one please help me. I'm trying to create scrollable result set in sql server 2000, but i just can't get it to work. I've been trying to do this for the past 12 hours. I want to go home, but I can't till I get this going! please help!!! My crap code is as follows:
    package transact;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JInternalFrame;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class DummyFrame extends Dummy
    protected String name, surname;
    protected Connection conn;
    protected CallableStatement cstatement;
    public DummyFrame()
    createFrame();
    private void createFrame()
    try
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    conn = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://server:1433;" +
    "user=user;password=pwd;DatabaseName=Northwind");
    catch (Exception e)
    e.getMessage();
    populateFields();
    menuAction();
    show();
    private void menuAction()
    btncontacts.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    getRecords();
    populateFields();
    btncontacts.setText("NEXT");
    btnkeywords.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    // transaction.getRecords();
    nextRecord();
    populateFields();
    btncontacts.setText("NEXT");
    protected void nextRecord()
    try
    // CallableStatement cstatement = null;
    cstatement = conn.prepareCall(
    "{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = cstatement.executeQuery();
    while (rs.next())
    surname = rs.getString("Lastname");
    cstatement.getMoreResults();
    catch (Exception e)
    e.getMessage();
    protected void getRecords()
    try
    CallableStatement cstatement = null;
    cstatement = conn.prepareCall(
    "{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = cstatement.executeQuery();
    while (rs.next())
    surname = rs.getString("Lastname");
    name = rs.getString("Firstname");
    rs.first();
    // call stored procedure
    catch (Exception e)
    e.getMessage();
    // populate the fields;
    private void populateFields()
    txtfirstname.setText(name);
    txtsurname.setText(surname);
    }

    ummm ok i think the logic in your code is kinda screwy...
    here is what your should be doing.
    create the gui.
    get the resultset...
    have code that looks like this for nextRecord...
    protected void displayNextRecord(){
      // we do not call next here because we already called it last time
      surname = rs.getString("Lastname");
      name = rs.getString("Firstname");
      populateFields();
      if(!rs.next(){
        btncontacts.setEnabled(false);// i'm not sure what btncontacts is but we want to disable next becuase there are no more records...
    // in your intitalization code you need to do this...
    // you old stuff ending with...
    ResultSet rs = cstatement.executeQuery();
    // the new stuff...
    if(rs.first()){
      displayNextRecord();
    }else{
      btncontacts.setEnabled(false);//the result set is empty
    }ok the real problem you are having is that you are trying to display one record at a time but you are scrolling
    through the entire result set using while(rs.next()... what you
    want to do is create the result set once and scroll through
    it one item at a time with your gui.
    the example method i have given displays the data from the current
    row in your gui. then it advances the result set forward one row if possible. this method assumes that the result set will always
    be positioned on a valid row thus the need for calling
    rs.first() before we originally call displayNextRecord()
    well i hope you find this helpful.

  • Working with result set i need a solution..... plz treat it as urgent

    i have a query which returns 12 records so the result set contains 12...
    now i want to display in the set of 5 rows... so
    out put must me
    Name Rate Name Rate Name Rate
    1 6 11
    2 7 12
    3 8
    4 9
    5 10
    how can i achieve this output...
    I guess this will clear the question......

    You create a for loop that indexes from 1 to 5. You get a row(item) from the result each time through the loop. You all check next() and break out of the loop when it returns false.

  • Needing Help with color setting for Photoshop 4 + imac

    Hi, Is anyone able to assist me please.  To cut a long story short.  i have had to reinstall my original software onto my Imac as when i put on Snow leopard it was just slowing down Photoshop 4 and would keep crashing.  So my problem is .... I had some prints printed today at Fuji and the prints have come back dark and just not up to scratch.  I know that it is not Fuji, but my settings.  I had someone set up my imac and Photoshop last time, but this time i will have to do myself and i just don't know what to set them at. Can anyone help please.  Not sure if you need this info but i am in New Zealand.  many thanks in advance.

    Being in the business of printing other people's image files, I can say without any doubt that the advent of digital image processing has definitely muddied the waters to a much greater extent than was the case when printing negaive film.  I'm also a shooter, and have been using such programs for many years, so I can understand the desire to manipulate your files before sending them to the lab. Color negatives never had "Profiles" attached to them.  If the proper film was used for the lighting conditions, it was simply up to the lab to make sure the resulting print was in balance, both in color and density.  It was also the lab's responsibility to maintain a degree of quality control that would make all of the above possible and repeatable.  I have to agree with the other response to your question.  Whether or not you have an embidded a profile, it's always the job of the printer to make sure the final print is up to a certain standard of quality.  If that is not the case, find another printer.  Unless you have indicated that your files should be printed without any corrections, the oweness belongs to the lab/printer.  I do have a few customers whose work I can print with very few corrections, due to the fact that they have calibrated their displays and have a very tight workflow.  However, the vast majority of files that I print require a considerable degree of correction, that's my job.  It's also the job of your lab/printer and if they are nor satisfying your needs you have to find someone who does.  I have printed many files that have no profile embidded and I simply convert them to my working color space(Adobe RGB 1998).  If you are concerned about doing color settings, this is the obvious place to start.  Create a custom space and make sure your working color is set to Adobe RGB 1998, not sRGB.  Adobe RGB 1998 is a considerably larger color space with a wider gamut and will allow for more choices and a wider range when it comes to processing the image.  Pro Photo RGB is an even larger color space, but one that is seldom used at this time.  I suspect it will become more popular in the fairly near future, as other technologies continue to push the color gamut envelope.
    So, I guess the gist of all of this is that you need to either have your lab/printer redo the dark prints, or find someone who knows how to print.  And equally important, someone who cares about your work as much as yo do.
    I am attaching a screen shot of my color settings and I would suggest this might be a good place to start.
    Gary

  • Help with Logic Sets

    Hi guys,
    We have a requirement for writing a logic set.
    The requirement is as follows-
    1. A metric Set gets data at a frequency of 4 months cycle (data is input in July, November and March).
    2. The user will enter the Current data corresponding to these 3 months only.
    3. The client needs the data entered for these months (July, Nov, Mar) to be copied to the remaining 3 months in the cycle.
    Can this be done using Logic Set? Can you please advise on how should we proceed with this requirement.
    Thanks in anticipation,
    Sameer

    Hi,
    Logic sets are very useful for various calculations.  They can be used when importing data to create "new columns" of data based on calculations of other data - and they can also be used at run-time as virtual variables.  I'm not suggesting that this is a good use of the later - but I wanted to answer your question and help folks understand how to use Logics.  (There may be better/more performant ways of accomplishing the same thing, such as making the variable a LAST or RATE variable.)    However, if you want to become familiar with the use and power of LOGICS, here is an examples below to get you started:
    I'm using the HFPBM sample database as a starting point. 
    Create a file in your Home directory (C:\Program Files\SAP BusinessObjects\Strategy Management\ApplicationServer\home) called BYPEg.txt.  Add the info at the bottom of this post.
    In PasAdmin, IDQL, run the commands:
    use HFPBM excl
    job BYPEg.txt;ext
    This example creates a logic (BYPeg) to perform some calculation, then defines a virtual variable called foo_index using that logic to selects only values that are below some threshold of UNITS_SOLD_CUST_TARDEV.
    remo logic BYPEg
    ...Copy Logic Terminal BYPEg
    OUTPUT temp.txt;ext over
    echo input testvar
    echo input thrshld
    echo result rslt
    echo SCALAR HoldVal
    echo BYPERIOD
    ...echo TEXT "Looping..."
    echo WHEN testvar LT thrshld
    echo     HoldVal = testvar
    echo ENDWHEN
    echo rslt = HoldVal
    ...echo DISPLAY UNITS_SOLD_CUST_TARDEV, HoldVal
    echo ENDBYPERIOD
    OUTPUT OFF
    COPY LOGIC temp.txt;ext BYPEg over
    Compile Logic BYPEg
    remo var foo_index
    cre var foo_index "Foo Index" by customer, product, store as BYPEg(UNITS_SOLD_CUST_TARDEV,1)
    sel var foo_index
    sel var plus UNITS_SOLD_CUST_TARDEV
    acro var down time
    list

  • Help with Password Set up WRT54G

    I set up this router forever ago and apparently it says I created a password, but I don't remember doing so and I have no idea what the password would be in order to set it up again on my computer. Is there a way to reset or use something else. I tried using Admin and that isn't working either. Please Help. Thanks

    Have you been running an unsecured wireless network?  With a router login password of "admin" ?   If so, then most likely your neighbor wirelessly connected to your router (intentionally or unintentionally)  and changed your login password.
    The only way to remove the password is to reset the router to factory defaults, then setup the router again from scratch.  After you have done this, to prevent this problem from recurring, be sure to change the login password from the default of "admin", and secure your wireless network.
    To reset your router to factory defaults, use the following procedure:
    1) Power down all computers, the router, and the modem, and unplug them from the wall.
    2) Disconnect all wires from the router.
    3) Power up the router and allow it to fully boot (1-2 minutes).
    4) Press and hold the reset button for 30 seconds, then release it, then let the router reset and reboot (2-3 minutes).
    5) Power down the router.
    6) Connect one computer by wire to port 1 on the router (NOT to the internet port).
    7) Power up the router and allow it to fully boot (1-2 minutes).
    8) Power up the computer (if the computer has a wireless card, make sure it is off).
    9) Try to ping the router. To do this, click the "Start" button > All Programs > Accessories > Command Prompt. A black DOS box will appear. Enter the following: "ping 192.168.1.1" (no quotes), and hit the Enter key. You will see 3 or 4 lines that start either with "Reply from ... " or "Request timed out." If you see "Reply from ...", your computer has found your router.
    10) Open your browser and point it to 192.168.1.1. This will take you to your router's login page. Leave the user name blank, and in the password field, enter "admin" (with no quotes). This will take you to your router setup page. Note the version number of your firmware (usually listed near upper right corner of screen). Exit your browser.
    If you get this far without problems, try the setup disk (or setup the router manually, if you prefer), and see if you can get your router setup and working.
    If you cannot get "Reply from ..." in step 9 above, your router is dead.
    If you get a reply in step 9, but cannot complete step 10, then either your router is dead or the firmware is corrupt. In this case, use the Linksys tftp.exe program to try to reload your router with the latest firmware. After reloading the firmware, repeat the above procedure starting with step 1.
    If you need additional help, please state your ISP, the make and model of your modem, your router's firmware version, and the results of steps 9 and 10. Also, if you get any error messages, copy them exactly and report back.
    Please let me know how things turn out for you.
    Message Edited by toomanydonuts on 12-29-2007 04:07 AM

  • How can I display more than one record with result set meta data?

    Hi,
    My code:
        ArrayList<String> resultList = new ArrayList<String>();
        rs=ps.executeQuery();      
        ResultSetMetaData rsmd = rs.getMetaData();      
        while(rs.next()){      
         for(int k=1;k<=rsmd.getColumnCount();k++){            
            resultList.add(rs.getString(k)); 
        ps.close();       
        }catch(Exception e){                                 
        e.printStackTrace();      
        return resultList;
        public String test(ArrayList result)throws Exception{ 
        String data=         
            "<tr>"+ 
            "<td class=normalFont>"+result.get(0)+"</td>"+ 
            "<td class=normalFont>"+result.get(1)+"</td>"+ 
            "</tr>"; 
        return data; 
        }  All the things are wroking but the problem is that ArrayList is displaying just one record whereas I have more than 20 records to display. I tried with loop like: i<result.size(); and result.get(i) then its throwing exception
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 I stuck here for the last more than 2 days. Please help me
    Best regards

    Raakh wrote:
    Still waiting .....I would have answered much earlier, but when I saw this little bit of impatience, I decided to delay answering for a while.
    ArrayList<String> list = new ArrayList<String>();
    list.add("abc");
    list.add("def");
    list.add("ghi");
    System.out.println(list.get(0));
    abc
    System.out.println(list.get(1));
    def
    System.out.printnln(list);
    [abc, def, ghi]That list has 3 items. Each one is a String.
    But here is what you appear to be doing:
    select * from person
    +-----+-------------+-------------+--------+
    | id  |  first name |  last name  | height |
    +-----+-------------+-------------+--------+
    |   1 | Joe         | Smith       | 180    |
    +-----+-------------+-------------+--------+
    |   2 | Mary        | Jones       | 144    |
    +-----+-------------+-------------+--------+
    for each row in ResultSet {
      for each column in ResultSet {
        list.add(that element);
    // which becomes
    list.add(1);
    list.add("Joe");
    list.add("Smith");
    list.add(180);
    list.add(2);
    list.add("Mary");
    list.add("Jones");
    list.add(144);
    System.out.println(list.get(0));
    1
    System.out.println(list.get(1));
    Joe
    System.out.printlN(list);
    [1, Joe, Smith, 180, 2, Mary, Jones, 144]That list has 8 items. Some of them are Strings and some of them are Integers. I would assume that, for this sample case, you would want a list with 2 items, both of which are Person objects. However, it really isn't clear from your posts what you are trying to do or what difficulty you're having, so I'm just guessing.

  • Help with itunes set up and back up

    Hi,
    Up until recently, I have always kept my itunes on my external hard drive, mainly because I have 2 computers (a desktop and a laptop) and thought it was an easier way to move between the 2 and not get too confused.  However, a couple of months ago I lost everything off my hard drive when it was dropped, and have been itunes-less ever since.  I've now finally got round to setting it all back up - I have an old external hard drive with most of the itunes still on, but I have still lost quite a few of the songs/albums I've purchased since I swapped to the newer one that's now broken (I've heard that Apple MAY give you one, and only one, chance to re-download songs that you've purchased if you beg, but haven't tried that yet).
    So, currently I have about 7000 items in my library, but they are all on my old external hard drive and I'm not sure what is the best way to set itunes up again and import all these.  I think my friend originally set up my itunes to read files from my external hard drive, but my library is still on my C Drive (so when I open itunes it still has all my songs but can't locate them), and obviously this probably turned out not to be the best way to keep everything, so I guess I need the external hard drive as more of a back up, rather than the ONLY copy.  I tried to import the files in, but ended up with 2 copies of everything (I'm really not the best at understanding itunes!!!).
    Basically my question is, what is probably the best way to store my itunes across 2 computers, AND have a back up copy on an external hard drive, and how do I go about setting it all up?  I want to be able to share the playlists and any newly purchased music across both computers without constantly getting myself in a muddle trying to copy various files etc.
    Can someone help?  I think I have itunes 10, and run Windows Vista on both computers. 
    Thanks

    This might help you troubleshoot.
    http://support.apple.com/kb/HT4367
    Good luck!!

  • Help with page set in indesign!!!

    Hi I am trying to set up a 8.5 x 11 brochure with double sided pages. the pages will originally be 17 x 11 so i can fold them into the correct size. how do I go about setting this up? I know i need to print duplex with saddle stitch but when i try to set up the 17 x 11 pages in indesign it makes the whole booklet that length. help....

    We need to be very clear about waht you mean by a "page" rather than the number of sheets on which this is going to be printed. If the brochure is one sheet of 11 x 17, printed on both sides and folded so it has 4 panels, then you can set it up as a two-page 11 x 17 document. I do it this way most of the time, and set the pages with two columns to make the margins at the gutter where it folds for convenience in layout. Side one (page 1 in the layout) would have the back cover on the left and the front cover onthe right, and side two (page 2 in your layout) would have the two inside "pages."
    In theory you can set up a longer document this way, too, but it's so much work to remember the imposition pattern and such a hassle and prone to error to work this way instead of looking at the design as the readers see the finished product, that I would never do it for more pages. Setting up as 8.5 x 11 facing pages is fast, easy to work with, allows for changing the page count if necessary, and works for automatic page numbering, so it just makes more sense to do that if you will be printing more than one sheet of paper.

  • Help with the set up of E4200

    Hi guys,
    Im new in this forum and need some help setting up a new router e4200.
    I have a friend with a business and he have 2 routers in their business but they dont have wireless so they  just want to add wireless to the customers.
    how i can set up e4200 just to share internet but not be the main router. I want to put the E4200 behind another router just to share internet.
    i think i have to connect the main router Lan port to the cisco e4200 internet port(Yellow port) and have the setting on the E4200 to get automatic Ip address. Im doing the thing right?
    Thanks for all your help.

    If you want to share the computers in the network then try LAN to LAN connection. So that all the computers will be in the same network.
    You will need to change the Local IP address of E4200 and disable the DHCP server on E4200. Connect cable from Ethernet port on main router to the Ethernet port on E4200. In this case all the IP addresses will be assigned by the main router and E4200 will act like a wireless access point.
    Follow this link to connect Linksys router to another router.

  • New 5g touch need help with photo setting and..

    Hello!
    Can someone help me pls. I'm sure anyone who has a 4g touch or iphone 5 or previous iphone can help. I'm coming from ipod touch 2g so a lot of this technology is foreign to me. Anyway, I accidentally synced my photo's from my computer onto my touch. I don't want thousands of pics on there. I can't seem to find a delete button for the albums on the touch. How do I delete them from my ipod? I have transferred pictured I've taken from the ipod to my computer, so I am not worried about deleting them. I have deleted individual pictures but thousands would take forever one by one. Also, I have set this ipod as a new device as I want to be particular about what is on it. So I didn't want to back up from my 2g. I've notice that when I synced and chose the game/apps I wanted on the device that they all reset. the games have deleted their save information and I have to start from scratch. Is this normal?
    Thanks,
    From a long time coming updated device!

    I think I might need a little clarification on your problem. But just to clarify, the iPod Touch nor the iPhone support synchronization over WiFi, they still have to be synchronized over a physical iPod cable. Are you trying to get both the iPod and the computer connected to the internet? Do you own a wireless router?

  • Please help - AbstractTableModel, result set and JTable

    Pls help me on this:
    I derive a new class, myTable that extends the AbstractTableModel, one of the member method is like this:
    public void setValueAt( Object data, int row, int col ){
    try{
    resultSet.absolute( row + 1 );
    resultSet.updateDouble( col + 1, Double.parseDouble( data.toString()));
    resultSet.updateRow();
    }//end try
    catch( SQLException sqlEx ){
    JOptionPane.showMessageDialog( null, "SQL error", "", 1 );
    Everytime i try to update the data( which is double), example 2.00, i will see this runtime error:
    java.lang.NumberFormatError: 2.00
    The database is Microsoft Access 2000 and OS is Win ME. I update the data by using JTable GUI( which extends the new class myTable).
    When i try to use Oracle database, then there is no problem for this.
    How to solve this problem?

    can i get a look at your TableModel for the JTable.
    Your problem with Access: Access "double" is not the same as
    Oracle's double.
    you can try the various types that have decimals until you find
    which one access will accept.

  • I am able to click on a picture in iPhoto to edit it opens automatically in photoshop cs6.  However when i am done editing I can not save that image back into iPhoto.  Can anyone help with a setting I am missing maybe?

    I am able to click on a pic in iphoto to edit it and opens automatically in photoshop CS6. However when I am done editing and save I can not save back into Iphoto.  Can any one help wiht this?

    Thanks Terence. What a relief. I still don't understand what the book I read was talking about then. Here's a quote from the section I was referring to in "iPhoto 08: The Missing Manual" book, p 91 (ISBN: 0596-516185):
    "Note, however, that the instant you edit a TIFF-format photo (Chapter 7), iPhoto converts it into JPEG.
    That's fine if you plan to order prints or a photo book (Chapter 11) from iPhoto, since JPEG files are required for those purposes. But if you took that once-in-a-lifetime, priceless shot as a TIFF file, don't do any editing in iPhoto-don't even rotate it- if you hope to maintain its perfect, pristine quality."
    After my test results, I thought maybe this was something that had changed from iPhoto 08 to iPhoto 09, so I went to the bookstore yesterday and checked the same book for iPhoto 09, and there it was, the same quote! (on a different page, of course).
    Anyway, thanks once again for your confirmation that my test was indeed correct. Linda

  • Need help with mms setting for nokia 5800 on T-mo...

    Ok I'm also having problems not receiving a full size image when sent thru Tmobile, the image shows up as 2kb so when i try to zoom it becomes blurry....
    I called tmobile support Tier III and they were not able to help...all i got was an email from them with additional settings to try on my phone but not sure where i can plug that information... it gives the port # the wap information...and so on..
    if you are using T-mobile US and can receive picture messaging, could you please send the the settings you are using.
    Thanks.

    The settings on a phone receiving an MMS have no bearing on the size of the picture being received. If you can receive anything then the settings are correct. If they were incorrect you wouldn't receive any MMS message at all.
    The problem lies with T-Mobile US. Their messaging gateway doesn't "know" that the 5800XM can receive MMS messages up to 600kb in size so it reduces the file size on the fly in order to comply with what it thinks the 5800XM can deal with.
    Only T-Mobile US can solve this problem.
    Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you!

Maybe you are looking for

  • Sharing music at home; sharing User IDs

    My wife and I are faced with a problem of playing music from the iTunes library we have built over the past few years either from CDs or from the Apple iTunes Store. I recently imported all our Cds into iTunes to save space and allow equal access. Ou

  • No longer recognizing my devices...

    Since downloading the most recent version of iTunes, my computer no longer seems to recognize my iPod or iPhone so I cannot download my purchases to my devices. When I plug in my devices, nothing happens; it does not seem to register that the devices

  • HP 620 Delphi malfunctioning

    My laptop powers but does not display and after powering the processor fun runs but for about i minute it switches off

  • MacBook Pro: Weird spontaneous wake up

    My Wife's MBP (Core 2 late 2006 model) had been asleep for 4 days when it suddenly woke up yesterday. We were not at home at the time, but this morning the machine was running (steady light, warm, but not hot), but opening the lid did not wake up the

  • Project System CN40 transaction

    Hi all,        I have added new fields in Structure STRUCR with the help of customer include,Now when I Run CN40 Transaction I dont get the values displayed in the list which are my ZTable fields. Kindly any one can let me know How should I go head w