How to fill a table using netBeans?

Hi. I use netBeans with Derby. I can create tables in my database (Create Table in Runtime), but I can't find any option which would allow me to fill my table with particular data. Could You give me some advice how to do this? I know that I can write a simple app which would add data to DB using text fields, but maybe there is some simpler tool?
Greetings

            while (rs.next()) {
                Vector ucliente = new Vector();
                ucliente.add(rs.getString("codigo"));
                ucliente.add(rs.getString("nombre"));
                ucliente.add(rs.getString("email"));
                ucliente.add(rs.getString("fax"));
                ucliente.add("");
                clientsModel.addRow(ucliente);

Similar Messages

  • How to fill internal table with selection screen field.

    Hi all,
    i am new to sap . pls tell me how to fill internal table with selection screen field.

    Hi,
    Please see the example below:-
    I have used both select-options and parameter on the selection-screen.
    Understand the same.
    * type declaration
    TYPES: BEGIN OF t_matnr,
            matnr TYPE matnr,
           END OF t_matnr,
           BEGIN OF t_vbeln,
             vbeln TYPE vbeln,
           END OF t_vbeln.
    * internal table declaration
    DATA : it_mara  TYPE STANDARD TABLE OF t_matnr,
           it_vbeln TYPE STANDARD TABLE OF t_vbeln.
    * workarea declaration
    DATA : wa_mara  TYPE t_matnr,
           wa_vbeln TYPE t_vbeln.
    * selection-screen field
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
    PARAMETERS : p_matnr TYPE matnr.
    SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
    SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
    * I am adding parameter value to my internal table
      wa_mara-matnr = p_matnr.
      APPEND wa_mara TO it_mara.
    * I am adding select-options value to an internal table
      LOOP AT s_vbeln.
        wa_vbeln-vbeln =  s_vbeln-low.
        APPEND  wa_vbeln TO  it_vbeln.
      ENDLOOP.
    Regards,
    Ankur Parab

  • How to fill internal table dynamically

    Hi All,
       how to fill internal table dynamically.
    for example:
    begin of itab occurs 0,
    empid like pa0000-pernr,
    empname like pa0001-ename,
    grade(5),
    end of itab.
    now i want to append dynamically field itab-grade along with rest fields.
    is this possible?? if yes kindly let me know how to do that.
    Regards,
    Kiran I

    Hi kiran,
    To fill and create and internal table dynamically you can use this code.
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
                   <l_line>  TYPE ANY,
                   <l_field> TYPE ANY.
    is_fieldcat-fieldname = 'FIELD1'.
    is_fieldcat-ref_field = 'MATNR'.
    is_fieldcat-ref_table = 'MARA'.
    APPEND is_fieldcat TO it_fieldcat.
    is_fieldcat-fieldname = 'FIELD2'.
    is_fieldcat-ref_field = 'SPRPS'.
    is_fieldcat-ref_table = 'PA0001'.
    APPEND is_fieldcat TO it_fieldcat.
    is_fieldcat-fieldname = 'FIELD3'.
    is_fieldcat-ref_field = 'BEGDA'.
    is_fieldcat-ref_table = 'PA0002'.
    APPEND is_fieldcat TO it_fieldcat.
    Create a new Table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = it_fieldcat
      IMPORTING
        ep_table        = new_table.
    Create a new Line with the same structure of the table.
    ASSIGN new_table->* TO <l_table>.
    CREATE DATA new_line LIKE LINE OF <l_table>.
    ASSIGN new_line->* TO <l_line>.
    Test it...
    DO 40 times.
      ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = '12345'.
      ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = 'X'.
      ASSIGN COMPONENT 'FIELD3' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = '20030101'.
      INSERT <l_line> INTO TABLE <l_table>.
    ENDDO.
    LOOP AT <l_table> ASSIGNING <l_line>.
    ASSIGN COMPONENT 'field1' OF STRUCTURE <l_line> TO <l_field>.
      WRITE  / <l_line>.
    ENDLOOP.
    regards,
    Aashish Garg

  • How to fill a table?

    hello all!
    i need to display a result set in a html table. I'm kinda confused with how the table will be filled up, since the table will grow depending on the number of records that the DB table has.
    here is what i have:
    <table border="1">
            <th>Row</th><th>Name</th><th>User/Dept</th><th>Use</th><th>Last Update</th><th>Updated By</th><th> </th>
           <%
            try{Connecting con = new Connecting();
                                ResultSet rs;
                                ResultSet rs;
                                String s[]= new String[10];
                                int x=0;
                                %>
                                <%
                                con.connect();
                                rs = con.viewUsers();
                                x= rs.getRow(); %>
                   <%while(rs.next()){%>
                   <%s[x]=rs.getString(1)
                   %>            
            <tr>
                <td></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%><td></td> <td>
            </tr>
        </table>

A: how to fill a table?

Hey!
Thanks for the hint, i'm getting the table filled, but now my issue is that its not showing the right data.
first the query i'm using:
public ResultSet viewUsers(){
        try{
            ps = conMsg.prepareStatement("SELECT  name + ' '+ lastName as 'Name', userDeptName as 'User/Dept.' , userDeptCategory as 'Use', lastChangedDate + ' ' + lastChangedTime as 'Last Update', lastChangedBy as 'Updated By:' from SystemUser");
            rs = ps.executeQuery();
        }catch(Exception e){
            e.getMessage();
            e.printStackTrace();
       return rs;
    }here is my code inside the jsp page:
<table border="1">
        <th>Row</th><th>Name</th><th>User/Dept</th><th>Use</th><th>Last Update</th><th>Updated By</th><th></th>
       <%
        try{Connecting con = new Connecting();
                            ResultSet rs;
                            String s[]= new String[10];
                            int x=0;
                            %>
                            <%
                            con.connect();
                            rs = con.viewUsers();
                            x= rs.getRow(); %>
        <tr>
             <%while(rs.next()){%>
                <%s[x]=rs.getString(1); %>
                <td></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%><td></td><a href="#">View</a> <a href="#">Modify</a> <a href="#">Delete</a><td>
        </tr>
             <%
              }catch(Exception e){}   %>
    </table>

Hey!
Thanks for the hint, i'm getting the table filled, but now my issue is that its not showing the right data.
first the query i'm using:
public ResultSet viewUsers(){
        try{
            ps = conMsg.prepareStatement("SELECT  name + ' '+ lastName as 'Name', userDeptName as 'User/Dept.' , userDeptCategory as 'Use', lastChangedDate + ' ' + lastChangedTime as 'Last Update', lastChangedBy as 'Updated By:' from SystemUser");
            rs = ps.executeQuery();
        }catch(Exception e){
            e.getMessage();
            e.printStackTrace();
       return rs;
    }here is my code inside the jsp page:
<table border="1">
        <th>Row</th><th>Name</th><th>User/Dept</th><th>Use</th><th>Last Update</th><th>Updated By</th><th></th>
       <%
        try{Connecting con = new Connecting();
                            ResultSet rs;
                            String s[]= new String[10];
                            int x=0;
                            %>
                            <%
                            con.connect();
                            rs = con.viewUsers();
                            x= rs.getRow(); %>
        <tr>
             <%while(rs.next()){%>
                <%s[x]=rs.getString(1); %>
                <td></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%></td> <td><%=s[x]%><td></td><a href="#">View</a> <a href="#">Modify</a> <a href="#">Delete</a><td>
        </tr>
             <%
              }catch(Exception e){}   %>
    </table>

  • How do you create beans using NetBeans 5.5?

    I am referring to http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html and I'm sorry but I can't follow any of this!
    I have NetBeans IDE 5.5 and I am trying to learn how to write beans using NetBeans, and the lessons involve things I can't find or understand, for example:
    re: http://java.sun.com/docs/books/tutorial/javabeans/writingbean/index.html
    <blockquote>
    Load the JAR file. Use the NetBeans IDE GUI Builder to load the jar file as follows:
    1. Start NetBeans.
    2. From the File menu select "New Project" to create a new application for your bean. You can use "Open Project" to add your bean to an existing application.
    3. Create a new application using the New Project Wizard.
    4. Select a newly created project in the List of Projects, expand the Source Packages node, and select the Default Package element.
    5. Click the right mouse button and select New|JFrameForm from the pop-up menu.
    6. Select the newly created Form node in the Project Tree. A blank form opens in the GUI Builder view of an Editor tab.
    7. Open the Palette Manager for Swing/AWT components by selecting Palette Manager in the Tools menu.
    8. In the Palette Manager window select the beans components in the Palette tree and press the "Add from JAR" button.
    9. Specify a location for your SimpleBean JAR file and follow the Add from JAR Wizard instructions.
    10. Select the Palette and Properties options from the Windows menu.
    11. Expand the beans group in the Palette window. The SimpleBean object appears. Drag the SimpleBean object to the GUI Builder panel.
    </blockquote>
    Sorry, you lost me literally after "Start NetBeans", the rest is Hungarian. I can't find "New Project Wizard"; I can't find "List of Projects", I can't find anything they are talking about nor do I know if any of this is relevant toward my learning how to write beans.
    Re: http://java.sun.com/docs/books/tutorial/javabeans/properties/properties.html
    "Inspecting Properties" seems impossible to do because the Inspector Window only shows a closed folder and nothing else ever. I can't figure out this part of the tutorial either.
    Can someone please explain this 3rd-grade-level to me: How to create a bean using NetBeans?
    Thanx
    Phil

    Phil,
    Before you embark on another very frustrating advanture using NetBeans, please go t hrough the NetBeans tutorial. The "New Project Wizard" is just select from the menu options -- "New Project". The "Hungarian" as you put it will not get better until you spend some time learning NetBeans. Learning something new, like beans, is frustrating enough, but to try to do it and use a tool that is not familiar may be beyond many individuals frustration level.
    Les

  • How to restore a table using RMAN with previous backup ?

    Hi everyone,
    we have to restore a table from 1 week previous backup using RMAN.
    Could you show me how to restore a table using RMAN with previous full backup.
    please Help me out.
    Thanks
    Info > oracle 10g, OS: AIX5L

    Hi,
    first of all you must have all the archivelogs since you want to recover your table from the previous backups.
    anyways if you want to recover your table then you need to perform incomplete recovery to the point where you loss the table for that you need to restore and recover your database.you likely to loose all the transcation which occurs to the point where you you loose your table.
    thanks..

  • How to create a table using Text Layout Framework?

    How to create a table using Text Layout Framework? I meen real tables - like in HTML.

    Cell as indipendant TLF should work, I have created my table using same approach and works fine for me ... this is where it is
    http://apps.live-documents.com/docs/openWebDoc.do?docId=1480607
    Regards
    Raf

  • How to fill internal table with no data in debugging mode

    Hi all,
             I modified one existing program.Now I want to test it.I am not given test data.So in the middle of my debugging, I found that one internal table with no data.My problem is how to fill that internal table with few records in that debugging mode just as we change contents in debugging mode.If I want to proceed further means that internal table must have some records.
    Please I dont know how to create test data so I am trying to create values temporarily in debugging mode only.
    Thanks,
    Balaji

    Hi,
    In the debugging do the following..
    Click the Table button..
    Double click on the internal table name..
    Then in the bottom of the screen you will get the buttons like CHANGE, INSERT, APPEND, DELETE..
    Use the APPEND button to insert records to the internal table..
    Thanks,
    Naren

  • How to Fill Setup tables for MAP (IS- Retail)

    Hello,
    I am working on MAP scenario, I found the following data sources as a part of it. Can anybody please tell me how to fill the setup tables for these and what are the base tables for it??
    2LIS_40_REVAL
    2LIS_40_S202
    2LIS_40_S207
    2LIS_40_S208
    Your reply is highly appreciated.
    Regards,
    Naresh

    Hi Naresh,
    We cannot fill setup tables for each data source.
    ORISBW -- This is the t-code to fill the setup tables for all the data sources which are related to application component 40.
    If you want setup tables names of your data sources please check below.
    2LIS_40_REVAL      ---   MC40RP0REVSETUP.
    Comes to your second post.
    2LIS_40_S202
    2LIS_40_S207
    2LIS_40_S208   these are LIS data sources, whic are replaced with LO data sources in SAP BI 7.0
    If you are using LO data sources then no need to use LIS data sources.
    Regards,
    Venkatesh

  • How to fill reconciliation tables (RCA, RCB, RCD, RCE etc.)

    Hello!
    I have a problem with empty tables in oracle database. These tables connected with reconciliation events (RCA, RCB, RCE etc) in OIM. They are empty, absolutely. Please, give me advise, how to make OIM fill these tables?

    I am not sure its easy to get all your information, but a good indication as a start is the USR_CREATEBY fiield in the USR table. If the USR_KEY referred to is of the OIMINTERNAL user then I would assume the user was created by reconciliation. For any other user the user was created by an admin. That does not unfortunately tell you from which system it was reconciled. If you need more information you may need to delve into the UPA (user profile audit tables). Again I do not think this directly tells you what system a user was created from. but if you find the creation event (SRC us the UserManager, Method: CREATE) the DELTA_SIGNATURE may confirm the reason as reconciliation, and by using timestamps you may find a way to cross-reference to the reconciliation event. I am afraid you may have to look into your data a bit more to see precisely what information this gives you.
    Edited by: duncandb on Nov 1, 2012 2:05 AM

  • How to fill setup table for Application 18 Customer services

    Hi,
    How can I fill setup table for application 18.
    Regards,
    ST

    Hi,
    To fill LIS, first set your LIS to update. use the central Tcode OMO1(for SD), OMO2(for MM) or OMO3(for other logistics) or you can set it in MC24 also(activate button).
    SBIW -> settings for application specific datasources -> Logistics -> managing transfer information structures ->.... -> statistical setup Sales. (Application component 17 >transaction OLIIBW,Application component 18> OLISBW )-->select the relevent one whether sales/billings/deliveries etc in the pop-up. enter your LIS, give a name to job and execute.
    Also pls chk this;
    Re: query on setup table filling
    Regards
    CSM Reddy

  • How to fill the table manually

    Hi guys,
    may I fill z table manually and how?
    thanks
    Nihad

    Hi,
    Please create a Table maintainance generator for the Table created, and then either use SM30 or SE16 or SE16N to fill the entries to that table.
    Please dont use SE11 to create entries to the database table created, because, If you are creating entries using SE11, then these entries will not be available in Quality system when you have transported your table from Development system to quality system.
    But those entries created using SM30 or SE16 or SE16N, will ask for a TR name and you can save the entries under that TR.
    Best Regards,
    Suresh

  • How to fill Bapireturn table ?

    Hello All,
    I've created a BAPI .
    In this BAPI as I shud not use exceptions I need to fill the BAPI Return Table.
    Can anyone tell me how to fill this BAPI Return Table ?
    I saw a FM BALW_BAPIRETURN_GET2 .
    How to use this FM ?
    Any help is appreciated .
    Regards,
    Deepu.K

    There are function modules to convert an error message into structure BAPIRET.
       CALL FUNCTION 'BALW_BAPIRETURN_GET1'
             EXPORTING
                  type       = 'E'
                  cl         = 'F2'
                  number     = '156'
                  par1       = sy-msgv1
                  par2       = sy-msgv2
                  par3       = sy-msgv3
                  par4       = sy-msgv4
             IMPORTING
                  bapireturn = return
             EXCEPTIONS
                  OTHERS     = 1.
    An other function module BALW_RETURN_TO_RET2 convert BAPIRETURN structure to BAPIRET2 structure.
    Regards

  • How to fill DDIC  table

    hi sdnrs,
    i want to fill DDIC table from two different internal tables is this possible if yes how . kindly give the sytax.
    rewards will be sured.
    thanks in advance.

    Hi,
    The Open SQL statement for inserting data into a database table is:
    INSERT INTO <target> <lines>.
    The Open SQL statement for changing data in a database table is:
    UPDATE <target> <lines>.
    To insert lines into a database table regardless of whether there is
    already a line in the table with the same primary key, use the following:
    MODIFY <target> <lines>.
    Check this link:
    For insert,
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm
    For update,
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm
    For modify,
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
    Regards
    Adil

  • Fill setup tables using Mirror systems

    Hello BW Experts,
    Could you provide the procedure how to do the fill of setup tables using mirror systems. This way i can avoid the downtime off the r/3 system.
    Regards,
    BWer

    Hi,
    What do you mean by mirror systems?
    You can do an early initialization, which will fulfill your requirement of not shutting down R/3 system.
    With Regards

  • Maybe you are looking for

    • How to change the variable value at run time in logical column in RPD

      for e.g.. i have used a session variable in logical column in rpd in case statement. now in dashboard prompt i am using that variable to store data which user is passing but the data captured is not getting reflected in the logical column. its been a

    • How do I update a brand new phone pryer to restoring?

      I just got a new phone and I want to restore a backup on my computer, but to do so, it's telling me that I must update the phone before I restore, but won't let me proceed without restoring! How do I update the phone and then restore it?

    • Preview in Browser CS6

      Dear friends, If i want to preview one of my CS6 websites, the program links to the external server in stead of the local file. I get the message "collecting data for servermap"(Dutch: 'gegevens voor servermap ophalen') en next the message that the p

    • Can't install Creative Cloud Desktop

      Hi all, I try to install Creative Cloud Desktop but I have over and over again the same message: "Could not create /Library/Application Support/Adobe/CoreSync" I used Creative Cloud Cleaner, re-installed, renamed folders: OOBE.OLD, OOBE_old, but I ha

    • Gamma: 1.8 or 2.2, etc.

      I have a Mac G5 (1995), OS 10.5.8, Radeon 9600 and a LaCie electron b 22 CRT, with PS CS4, processing camera raw and adobe RGB. I need a monitor calibrator (am using an old Spyder, but unhappy with it), and will get an LCD when the LaCie croaks. My q