JTable data retrieval problems

I've made a three tables on a jframe that collect information from the user. The first two have two columns (one for email addresses and the other for names). The third table has one column to input several ID for our database.
Anyway, when i try to access the data after they start the processing i can get the names and email addresses just fine using something like this
                for (int x = 0; x < tests.length; x++) {
                    tests[x] = new Person(testTable.getModel().getValueAt(x, 1).toString(), testTable.getModel().getValueAt(x,0).toString());
                for (int x = 0; x < seeds.length; x++) {
                    seeds[x] = new Person(seedTable.getModel().getValueAt(x, 1).toString(), seedTable.getModel().getValueAt(x,0).toString());
                }Those work great! But when i use similar code to get the information from the third table
for (int x = 0; x < counts.length; x++) {
                    counts[x] = countTable.getModel().getValueAt(x, 0).toString();
                }it does super wierd things. If i only have one row it doesn't return anything. If T have two row with the second one empty it also returns nothing. It I have two rows both with a value then it returns the first. and so on. Basically it returns all the values but the last one that is filled in and nothing else after that. Any Ideas as to why it's doing this? Thanks! :)

go to command prompt
do a ftp (ip address ) of that server, and log in with appropriate name and password.
Depending on type on file set ftp mode to bin/ascii
then do a put filename if u want to transfer a file from ur comp to the m/c
else do a get filename
and it will get the file to ur current local dir.
for multiple files do a mget/mput
I hope thats what u wanted!

Similar Messages

  • JTable data persistance problem

    i have large number of rows to be displayed in a JTable , the user can configure the number of rows he
    wants to view , the table will have next and previous buttonns to navigate to the different pages , i have
    solved the problem by reading data from. a 2 dimensional object array according to the user choice , the
    next and the previous buttons are working , but the problem is there is no data persistance for example if
    the user deletes 2 rows from the 1st page and goes to the 2nd page , when he comes back again to the 1st
    page the deleted elements are still there. I am using an my own model which implements abstract table model.It would b gr8 if any one can send the code.Thanks in advance.

    Are you removing the rows from your Object Array?
    if so, you are rigth now, you must to use at you model
            fireTableDataChanged();When you change data from your object array.
    Hope this helps...

  • Data retrieval problem - Urgent!!!

    Hi all,
    Have a very queer problem.I have a program which queries data from a Z table. The problem is that it does not work for some entries of the ztable. The user enters 4 details in the sel-screen and all these 4 are used for the query.
    Some entries when queried through the program gives me sy-subrc 4 even though all input values are correct ( please donot reply suggesting me to check my inputs).
    I separately queried using the same values in se16 and the record is fetched.but it doesnot happen in through the program.
    Any idea guys..if you have faced such problems before.??

    hi rahul....
    please check your code gain and just check if there is some zero padding or some other conversion exit required..many times this is the major problem while fecthing the data.
    please check whther the data is coming with some zero padding or some other conversion.

  • Data retrieval problem

    Hi
    i was not able to get the data from the DB.which i have inserted.
    Is there any method under package
    "oracle.dacf.dataset.*" to get the data unlike ResultSet.getXXX method in normal java codes.

    Ragavan --
    Could you please supply some more details describing what it is that you want to do?
    Thanks!
    -- Brian
    null

  • Date Format problem in a JTable, help plzzz !!!

    Hi,
    i have a JTable which contains multiple date columns, and more particulary, Timestamp columns.
    I mean this format : yyyy-mm-dd hh:mm:ss.fffffffff
    I only need hh:mm:ss informations for my JTable.
    The problem is when i retrieve the datas in the JTable (which has a bean Select for model), the date column has this format : yyyy-mm-dd (only the date), and the time is not present !
    What must i do to have only a part of the timestamp data in the column ??
    Thanks in advance
    Steve

    If you want to format data in any way other than the default in a JTable, you need a table cell renderer. Sun's tutorial on how to use JTables explains them.

  • Problem in populating jtable data from database

    hi,
    i am using JTable to retrieve data from database and show it in table. JTable
    is working fine with static data. but while retrieving from databse its giving a NullPointerException at getColumnClass() method. Below is complete source code. plzz help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.sql.*;
    import javax.swing.table.*;
    /*jdbc connection class*/
    class connect
    Connection con;
    Statement stat;
    public connect()throws Exception
    Class.forName("org.postgresql.Driver");
    con=DriverManager.getConnection("jdbc:postgresql://localhost/dl","dl","dl");
    stat=con.createStatement();
    public ResultSet rsf(String rsstr)throws Exception
    ResultSet rs=stat.executeQuery(rsstr);
    return rs;
    public void upf(String upstr)throws Exception
    stat.executeUpdate(upstr);
    class MyTableModel extends AbstractTableModel
    private String[] columnNames = {"name","id","dep","cat","rem","chkout"};
    Object[][] data;
    public MyTableModel()
    try{
    connect conn=new connect();
    ResultSet rs3=conn.rsf("select * from usertab");
    ResultSetMetaData rsmd=rs3.getMetaData();
    int col=rsmd.getColumnCount();
    int cou=0;while(rs3.next()){cou++;}
    data=new Object[cou][col];
    System.out.println(cou+" "+col);
    ResultSet rs2=conn.rsf("select * from usertab");
    int i=0;int j=0;
    for(i=0;i<cou;i++)
    rs2.next();
    for(j=0;j<col;j++)
    data[i][j]=rs2.getString(getColumnName(j));
    System.out.println(data[0][2]);
    }catch(Exception e){System.out.println("DFD "+e);}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
           public Class getColumnClass(int c) {
              return getValueAt(0, c).getClass();
            public boolean isCellEditable(int row, int col) {
                if (col < 2) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                data[row][col] = value;
                fireTableCellUpdated(row, col);
    class MyFrame extends JFrame
    public MyFrame()
         setSize(600,500);
         JPanel p1=new JPanel();
         p1.setBackground(new Color(198,232,189));
         JTable table = new JTable(new MyTableModel());
         table.setPreferredScrollableViewportSize(new Dimension(500,200));
         table.setBackground(new Color(198,232,189));
         JScrollPane scrollPane = new JScrollPane(table);
         scrollPane.setBackground(new Color(198,232,189));
         p1.add(scrollPane);
         getContentPane().add(p1);
    /*Main Class*/
    class test2
         public static void main(String args[])
         MyFrame fr =new MyFrame();
         fr.setVisible(true);
    }thanx

    hi nickelb,
    i had returned Object.class in the getColumnClass() method. But then i
    got NullPointerException at getRowCount() method. i could understand that the
    main problem is in data[][] object. In all the methods its returning null values as it is so declared outside the construtor. But if i declare the object inside the constructor, then the methods could not recognize the object. it seems i cant do the either ways. hope u understood the problem.
    thanx

  • Discoverer Viewer Locale language - problems with data retrieved

    Hi all, I have a very strange problem.
    I'm using Discoverer Viewer 10g and when I connect to the same eul/database using Locale: Locale retrieving from browser, I see all my data different from "0" into my report; if I choose Greek as Greek's language I see ONLY "0" as data.
    All the queries for the reports are always the same, but something has problems with the language chosen.
    This doesn't happen, for example if I choose another language (Italian or French for example), but ONLY with Greek !!!!
    Anyone have had a similar problem in the past ?
    Thanks in advance
    Alessandro

    It appears as though there is a general JDBC problem. Please make sure your JDBC client is up to date with the Server. We have seen data conversion problems when there was a mismatch.

  • Query Error Information: Result set is too large; data retrieval ......

    Hi Experts,
    I got one problem with my query information. when Im executing my report and drill my info in my navigation panel, Instead of a table with values the message "Result set is too large; data retrieval restricted by configuration" appears. I already applied "Note 1127156 - Safety belt: Result set is too large". I imported Support Package 13 for SAP NetWeaver 7. 0 BI Java (BIIBC13_0.SCA / BIBASES13_0.SCA / BIWEBAPP13_0.SCA) and executed the program SAP_RSADMIN_MAINTAIN (in transaction SE38), with the object and the value like Note 1127156 says... but the problem still appears....
    what Should I be missing ??????  How can I fix this issue ????
    Thank you very much for helping me out..... (Any help would be rewarded)
    David Corté

    You may ask your basis guy to increase ESM buffer (rsdb/esm/buffersize_kb). Did you check the systems memory?
    Did you try to check the error dump using ST22 - Runtime error analysis?
    Edited by: ashok saha on Feb 27, 2008 10:27 PM

  • Real tough data retrieval - assistance needed

    Late 2011 Macbook Pro with 500GB hard drive
    Lion 10.7
    One morning out of absolutely nowhere I get this grey screen with a flashing question mark folder. I take it to the geniuses at the Apple store and they tell me my hard drive has failed (no explanation). My mac is under warranty so they gave me a new hard drive for free, bagged my old hard drive and told me "good luck" retrieving the data.
    I'm on a mission to retrieve the data without paying for services. I have never retrieved data before but I've been doing a lot of forum reading and I have been getting protips from an IT friend who has saved my PC data before.
    As of now, I have been unable to even access the hard drive and so I am reaching out to the community to help me conquer this project.
    the problem is not the OS (according to Apple store)
    when hooking up with the dongle, neither Finder nor Disk Utility detect the bad drive
    the drive will spin when forced by the dongle (so I've ruled out the freezer method)
    I was advised (by friends and forums alike) to download so powerful data retrieval software:
    Data Rescue [did not detect bad external drive]
    Disk Drill [did not detect bad external drive]
    TestDisk (http://www.cgsecurity.org/wiki/TestDisk) [I can get it up and running but I have no idea how to use this software]
    So that seems to be the big problem, when I hook up my failed drive as an external hard drive, there is no acknowledgement from my MBP that it is connected and as such data recovery programs cannot access it. When I still had it installed in my computer, there was no clicking sound and it doesn't seem like any of the components are jammed up as it still spins.
    Where do I go from here? Please keep in mind that I am new to resolving my own technical problems but I'm willing to learn. Tired of being one of those people who look at computer parts and get anxious.
    NOTE: I haven't tried Target Mode as I do not have a firewire cable or access to another mac (yet). If you think I should try this, please let me know.

    A hard drive that will not divulge BOTH its Make&Model and a reasonable size/capacity to the likes of Disk Utility and data rescue programs has died, and connot be repaired with any software.
    Target Disk mode will not improve anything. The drive is read as a Mac Volume by software. If it won't mount under Mac OS X, it won't mount under Target Disk Mode.

  • Slow data retrieval on 8i

    I am using oracle 8i database on Windows 2000 server on compaq
    proliant 350 server machine. The problem is that sometimes
    connecting from a client is very slow and after connection data
    retrieval is also slow. I am usring TCP/IP and net8. I came to
    know from internet that there is a patch which is actually a
    work around to solve this problem. Can anybody help me to locate
    this patch?
    Thanks in advance.
    G. Rajan.

    You can probably prove that this is the issue by creating a retrieve using the excel addin or smart view to replicate the form and see how long it takes to retrieve.
    You will also see in the essbase app logs how long it is taking to perform the retrieve.
    Cheers
    John
    http://john-goodwin.blgspot.com/

  • Data retrieval failed

    Greetings all,
    i'm having a problem in order to retrieve data from oracle 10g views.
    Notes: Data retrieval from other tables are just fine. Some views are created for me in order to share some data from other databases. As far as i concern, we actually use the same syntax (as retrieving data from table) in order to retrieve data from view. This is my codes:
    if (($_POST['barcode'] != "") || ($_POST['sname'] != "") ) {
    include("conn.php");
         if (!$conn){
              echo "Error!Cannot connect to database, please try again later";
              exit;
         @mysql_select_db($db);
                   $sname = strtoupper ($_POST['sname']);
                   $barcode = strtoupper ($_POST['barcode']);
                   $ss = strtoupper ($_POST['ss']);
                   print $sname;
                   print $barcode;
                   print $ss;
                   if ($barcode != ""){
                   $stid = OCIParse($conn, 'SELECT NAMA FROM VIEW_A WHERE SEM=:ss AND BAR=:bc');
                   oci_bind_by_name($stid, ":bc", $barcode);
                   oci_bind_by_name($stid, ":ss", $ss);
                   }elseif($sname != ""){
                   $stid = OCIParse($conn, 'SELECT NAMA FROM VIEW_A WHERE SEM=:ss AND NAMA=:sn');
                   oci_bind_by_name($stid, ":sn", $sname);
                   oci_bind_by_name($stid, ":ss", $ss);
                   $r = OCIExecute($stid);
                   $row = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS);
                   if ($row==0)     
         ?>
    No Records!
    <?php
                   else
                   while (($rows = oci_fetch_array($stid, OCI_BOTH))) {
         ?>
    Name:: <?php echo $rows[0]; $rows['NAMA'];?>
    <?php }}} ?>

    I didn't understand what real problem you have?
    If you missing one row of data, it's because you don't print the first row out.
    If you mean that results are not ordered, then you need to add an ORDER BY clause to the queries.
    PS you have a mysql call in there. Also you mix the old and new OCI function naming style.

  • PHP MySQL data display problem

    I am having trouble getting data to display on my web page.In Dreamweaver CS3, I created a new page.
    Selected PHP as the type.
    Saved it.
    Connected a database and created a recordset (all using Dreamweavers menus. I did not write any code).
    NOTE: The database is on a remote server.
    The TEST button displayed the records from the recordset with no problem.
    On the new page, I then typed some text.
    Then dragged some fields from the Bindings tab to the page.
    I saved it and then went to preview it in my browser.
    The page comes up completely blank. Not even the text shows.
    I then saved the page as an HTML page.
    When I preview this in my browser, the text shows, but the fields and data do not.
    I then tried creating a dynamic table (again, using the Dreamweaver menus.).
    A similar thing happens, ie. If I save it as an HTML, the text shows and the column labels and border shows, but no data.
    Nothing shows if I save it as a PHP file.
    I can view the data online using files created by PHPMagic, so I know the data is there and retrievable.
    It is just in pages created in Dreamweaver that don’t work.
    What am I doing wrong?

    My web server supports PHP. I can disply PHP pages created by other software packages, just not the Dreamweaver ones.
    Frank
    Date: Thu, 4 Jun 2009 19:04:03 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP MySQL data display problem
    To view php pages - or pages with PHP code in them - in a browser, the page must be served up by a Web server that supports PHP. You can set up a testing server on your local machine for this purpose. Look for WAMP (Windows), MAMP (Mac), or XXAMP for some easily installed packages.
    Mark A. Boyd
    Keep-On-Learnin'
    This message was processed and edited by Jive.
    It shall not be considered an accurate representation of my words.
    It might not even have been intended as a reply to your message.
    >

  • Multi server data retrieval performance

    Hi experts,
    I have a question regarding the data retrieval performance (EVDRE) on a multi server installation environment on Microsoft SQL Server 2008.
    We have succesfully migrated Outlooksoft 4.2 SP03 to SAP BPC 7.0 SP07 for a customer. During this project we have also set up a complete new server environment consisting of:
    Development server: dedicated single server, Windows 2003 Standard SP2 32 bit, SQL Server 2008 SP1 with cumulative update package 6, SAP BPC 7.0 SP07, 2 quad core processors, 4 GB RAM
    QA server: dedicated multi servers - 1 database server (SQL/OLAP), Windows 2003 Standard SP2 64 bit, SQL Server 2008 SP1 with cumulative update package 6, 2 quad core processors, 32 GB RAM - 1 dedicated application/web server, Windows 2003 Standard SP2 32 bit, SQL Server 2008 SP1 with cumulative update package 6 (shared components / reporting services), SAP BPC 7.0 SP07, 2 quad core processors, 4 GB RAM
    Production server: dedicated multi servers - 1 database server (SQL/OLAP/Reporting services), Windows 2003 Standard SP2 64 bit, SQL Server 2008 SP1 with cumulative update package 6, 2 quad core processors, 32 GB RAM - 2 dedicated application/web server, Windows 2003 Standard SP2 32 bit, SQL Server 2008 SP1 with cumulative update package 6 (shared components), SAP BPC 7.0 SP07, 2 quad core processors, 4 GB RAM
    Furthermore, two terminal servers with the SAP BPC client.
    All servers have good performancve and we have great times on cube processing and SQL processing. However, to our great surprise we find that the single development server is much faster with a single user to retrieve data using EVDRE than the multi-server environment. About 2x as fast. A reporting book with more then 10 sheets and about 25 EVDRE's takes about 42 seconds on the development server and 93 seconds on the multi server.
    It seems that EVDRE is taking up a lot of time to communicate between the application server and the database server in a multi server environment while being much faster on a single server. This is not what we want :-). The network speed in the domain consist of all 1 GB lines so that should not be the issue.
    Do you have any experience with this? How can we upgrade the speed of the multi server, are there specific settings?
    Hope the get some useful answers. Thanks in advance.
    Damien
    Edited by: DWiegman on Feb 20, 2010 4:15 PM

    Hi,
       You have to activate also the EVDRE logs on the client and server level, just to understand from where is coming the problem (appserver-db comuncication or client-appserver communication). You have to check also if there is any proxy firewall between client and application server.
        In case you are using NLB, please verify if afinity is setup to true.
        The performance problems can be come from db level. Did you verify how many records do you have into WB table for the specific application? Are you keeping the DB in full mode? How big is the log of the databse?
        The are a lot of things that can have impact of this, but it looks to be a setup problem.
    Hope this can help you,
    Mihaela

  • Data Retrieval from SSRS 2008 R2 to SQL Server 2012 standard

    Hello,
    We have a virtual machine running SSRS 2008 R2 and a physical server running SQL server 2012 standard.  We are having an issue with a report that is taking almost 10 minutes for the data to be retrieved from the sql 2012 database.  We used the
    execution logging query to debug and analyze.  We see that it renders and processes very fast, but the data retrieval time is very slow.  When the same query is run using sql studio mgr. from the SSRS server it runs just fine...it
    takes seconds for the results to come up.
    I don't believe there is a compatibilty issue because other reports run fine.  We're just having problems with one report.

    A long shot, but I've seen where the data type of a report parameter is mismatched against the data type of the table it is being compared against.  SQL profiler would show this clearly.  
    This would explain why the query returns quickly in ssms but not with the report.  

  • Java.io.NotSerializableException when overwrite the JTable data into .txt file

    hi everyone
    this is my first time to get help from sun forums
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
    but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    the following is my code...some of it i create it with the GUI netbean
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    this is the code that suspect maybe some error here
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2);
                   oos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                   return;
              System.out.println("JTable correctly saved to file " + filename);
    }the full code will be at the next msg

    this is the part 1 of the code
    this is the full code...i had /*....*/ some of it to make it easier for reading
    package gui;
    import javax.swing.*;
    import java.io.*;
    public class timetables extends javax.swing.JFrame {
        public timetables() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            jTextField1 = new javax.swing.JTextField();
            jLayeredPane1 = new javax.swing.JLayeredPane();
            jLabel6 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jScrollPane3 = new javax.swing.JScrollPane();
            jTable2 = new javax.swing.JTable();
            jScrollPane4 = new javax.swing.JScrollPane();
            jTable3 = new javax.swing.JTable();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
    /*       org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 400, Short.MAX_VALUE)
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
            String filename1 = "studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable2 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable3 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            jTable2.setRowHeight(20);
            jTable3.setRowHeight(20);
            jScrollPane3.setViewportView(jTable2);
            jScrollPane4.setViewportView(jTable3);
            jTable2.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
            jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
            jTextField1.setText("again n again");
            jLabel6.setText("jLabel5");
            jLabel6.setBounds(0, 0, -1, -1);
            jButton2.setText("jButton2");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
          

Maybe you are looking for

  • Downloads to block viruses?

    looking for downloads to block viruses and malware?

  • Need to print the company logo in alv report

    Hi All ,        I am displaying an alv grid for some QM report .        I have used top-of-page event and   'REUSE_ALV_COMMENTARY_WRITE '    FM to display the logo and header . Every thing is working fine .   But when I am taking the print-out  the l

  • Can't stream songs in music using mobile data since upgrading to ios 8.1.3

    Since upgrading to iOS 8.1.3 I can no longer play songs in 'music' that are not downloaded to my phone? This was not an issue before the upgrade, any advice on how to fix this? I only have a 16gb 6, so cannot use space storing all my music And being

  • How to change second birthday entry in contacts to be english

    I recently noticed that when I attempt to "add" a second birthday entry into my contacts the date options come up in Chinese.  If I attempt to change it by clicking on chinese, the only options available are chinese, hebrew and islamic.  This does no

  • Production order settlement with 0

    Hi, I understand each month end Internal Order must be 0. When I see in production order, those production order with status teco, it is 0 in KOB1 but those production order status which not teco, i see the balance in KOB1. So I would like to know sh