How to fill table from datatable(MySQL)

hi;
I am starting with Visual web java server faces, and I want to fill a Table using an information from MySQL data base, i am trying to modify a example code I have found on netbeans totorials but they are using droplist and I want firts to use a texfield to set a "name" and button to search using a MySQL query to seek on data table and get the return and set it to Table.
Basicly I dont Know HOW to connect a data base using same code like a desktop application but in Visual Web Java Server Faces.
thank you in advance.
Miguel V.

Hi;
I hava done this code but still geting a mistake with tomcat
Next steps i follow to conectand display on data table:
1.-Create conecction with MySQL usen service.
2.-On service drag "directorio" to Table
3.-Binding all objets (Textfield1, Table and Button)
4.-On button1 create the next code:
Object optener =3;
//set the dataprovider with element number 3, on DIRECTORIO.ID of datatable directorio
directorioDataProvider.setCursorRow(directorioDataProvider.findFirst("DIRECTORIO.ID", optener));
//Get the row with same ID=3
getSessionBean1().getDirectorioRowSet().setObject(1, optener);
//Shows the inf on table
getSessionBean1().getDirectorioRowSet().execute();
directorioDataProvider.refresh();

Similar Messages

  • How to fill table control by these FMs

    Hi,
    How to fill table control rows by using function module dynp_update_fields or dynp_values_update. I have a custom screen wherein i have few input/output fields at the top. F4 help has already been defined for these fields and i want to populate/refresh a table control available in the same screen w.r.t., value chosen by user from F4 help. please let me know how to use these FMs for this or if there is any other way to do this.
    Rgds

    Look at FM DYNP_GET_STEPL which provides  povstepl  index to be able to update field values in correct row of table control with  DYNP_VALUES_UPDATE (and to read correct value with DYNP_VALUES_READ  too)
    NB: If you need to update multiple rows, I'm not sure that can be done in POV, you may be required to modify the internal table and trigger PAI/PBO cycle with a suppress dialog, or method/FM to trigger ok_code.
    Regards,
    Raymond

  • How to move table from one tablespace to other tablespace?

    how to move table from one tablespace to other tablespace?

    887274 wrote:
    how to move table from one tablespace to other tablespace?
    alter table <table_name> move  tablespace <new_tablespace_name>;
    Rebuild the indexes; alter index <index_name> rebuild <new_tablespace_name> online;Example;:
    SQL> create table ttt( ID NUMBER PRimary key);
    Table created.
    SQL> insert into ttt values (1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL> alter table ttt move tablespace users;
    Table altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 UNUSABLE
    SQL> alter index SYS_C0010863 rebuild tablespace users online;
    Index altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL>

  • How to export tables from development server to production server

    HI,
    Any body plz let me know how to export tables from development server to production server. what are the user names and password i need to ask my manager to do that. what are the requirements i need to ask him.
    Plz reply me ASAP.
    Thanks in advance.

    hi buddy
    first of all you should let us know the environment of production and development servers
    database versions
    and you need to have userid which has privilege to export tables of other schema. userid(owner) of the tables you want to export.
    Traditional way
    export tables in development server and then ftp to production and then import
    in the above case you should have similar database structure(tablespace etc) to avoid errors...
    if there are few tables only , you can use dblink instead of export and import...

  • How to read tables and fields transaction,how to find table from a strucre

    hi all,
      i am having problem in reading tables and fields for developing a customised report. can anybady help me how to extract tabele and fields from a transaction code and how to map table from a structure.
    It will me much help full, if u had any documentation. u should be appreciated.
    Thanking u
    kiran
    Message was edited by:
            kiran

    Hi Kiran,
    You can make use of the tables or Views available.
    Reward If Useful.
    Regards,
    Chitra

  • How to find tables from database having no partition

    Hello Sir,
    How to find tables from oracle database having no partitions?
    Thank you.
    -Mal

    @SB,
    SQL> SELECT OWNER, TABLE_NAME FROM DBA_TABLES
      2  MINUS
      3  SELECT OWNER, TABLE_NAME FROM DBA_TAB_PARTITIONS;
    SELECT OWNER, TABLE_NAME FROM DBA_TAB_PARTITIONS
    ERROR at line 3:
    ORA-00904: "OWNER": invalid identifier@OP,
    select table_name,partitioned from dba_tables where partitioned='YES';
    select table_name,partitioned from dba_tables where partitioned='NO';
    Regards
    Girish Sharma
    Edited by: Girish Sharma on Jul 1, 2011 9:27 AM

  • How create temporary table from list of values

    Can you anybody advise me how can I create temporary table from list of values? I have list of values and need create temporary table for next use with command JOIN etc.
    Thank you for help

    NO, you can not create temporary table in oracle on the fly ( Like #Tabels in SQl Server or Sybase ) , you will have to use the GTT i.e Global Temporary Tables
    check the following link GTT :
    to flush the tables after commit
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT DELETE ROWS;In contrast, the ON COMMIT PRESERVE ROWS clause indicates that rows should be preserved until the end of the session.
    so to keep rows in Table after commit
    CREATE GLOBAL TEMPORARY TABLE my_temp_table (
      column1  NUMBER,
      column2  NUMBER
    ) ON COMMIT PRESERVE ROWS;

  • How to View Tables from java side from NWDS/NWDI?

    HI All,
    I want to view the following tables from java side
    CRM_ISA_ADDRESS
    CRM_ISA_BASKETS
    CRM_ISA_BUSPARTNER
    CRM_ISA_EXTCONFIG
    CRM_ISA_EXTDATHEAD
    CRM_ISA_EXTDATITEM
    CRM_ISA_ITEMS
    CRM_ISA_OBJECTID
    CRM_ISA_SHIPTOS
    CRM_ISA_TEXTS
    How can I view them using NWDS/NWDI?
    Which DC has this tables?
    Could you please help me with the procedure to view them?
    Thanks and Regards,
    Gauri

    Hi All,
    crm/isa/isacoreddic and crm/isa/shopddic in SAP-CRMDIC are having these tables.
    Thanks and Regards,
    Gauri

  • How to create table from another in pl/sql

    Hi I need to create a table from another in pl/sql
    How can I do this

    The proper way to do this, is not to do it in PL/SQL. But do it in SQL, something like:
    create table tbl
    as
    select *
      from other_tbl;Doing it in PL/SQL is really slow compared to SQL.
    Yes, if you really want to create a table using PL/SQL then you will need to use DBMS_SQL or EXECUTE IMMEDIATE (Native Dynamic SQL) to do this.

  • How to fill tables of VFBS transaction code?

    Hi all,
    we have modified standard status U of program SAPMV45B in order to have a new button to show an ALV.
    But when we press 'back' button of the ALV it doesn't work properly and it doesn't return to the corresponding transaction where we were (VA01/VA02/VA03).
    We think we have not filled properly the tables of VFBS.
    Any ideas of how to fill them?
    Thanks in advanced.

    Hi,
    The problem can be because of below reasons:
    1. At first time saving of your Transaction code, you could have selected as Local Object.
    2. You could have assigned a new TR to the Transaction.
    Solution:
    1. You can delete the transaction code once. And again generate the transaction code, and save it in your old TR itself.
    Regards,
    Vishal

  • How to fill cells from a maximum to minimum

    Hi very simply if I have a column of twenty cells and in cell 1 I put the number 1 and in cell 20 I put the number 20 is there a way numbers can automatically fill the cells 2-19 with the appropriate increments?  I know you can drag a corner of two cells and it will continue the pattern but I have two values in mind an upper and a lower and want to fill the gap between the two.
    Thanks

    "I wanted to award the top mark of 20 points and slowest time or more of 1 point and just spread the gap evenly across points 2-19."
    How does a participant get a time that is "more" than the "slowest time"? (see NOTE appended)
    Using the described method of assigning points, here's an example.
    For two races, each with three competitors, the points awarded could be (rounded or truncated from) the calculated values below:
    Note that the 'best' times and the 'second best' times in both races are the same. Only the time of the slowest runner (and the consequent score of the 'second best') are different.
    If the (huge) difference in score for an identical performance when compared with the winning time is acceptable, here's a solution that will calculate those results directly from the list of times (in seconds, expressed as a decimal number).
    Notes:
    Columns C, D and E are independent calculations, each using the in column B. C shows the raw point value; D shows the same calculation with the result truncated to show only the integer part, E shows the same calculation with the result rounded to the nearer integer value. See the scores for Runners 4, 7, 9 (and others) for differences when reducing the point values to whole number values.
    For test and demonstration purposes, I entered the fastest and slowest times in the first two cells of column B, and generated the rest using the RANDBETWEEN function. The entered scores can be in any order. Runners who did not participate, or did not finish should have their column B cell left empty.
    Formulas: The three formulas are identical except for truncating or rounding parts (shown in bold). Pick the one that best suits your needs. They're placed in the top row containing race times, and filled down from there.
    C2: =IF(LEN(B)>0,1+19*(MAX(B)-B)/(MAX(B)-MIN(B)),"")
    D2: =IF(LEN(B)>0,INT(1+19*(MAX(B)-B)/(MAX(B)-MIN(B))),"")
    E2: =IF(LEN(B)>0,ROUND(1+19*(MAX(B)-B)/(MAX(B)-MIN(B)),0),"")
    Regards,
    Barry
    NOTE: Your mention of 'the slowest time or more' might offer a way around the score variation noted above. The organization governing F1 racing introduced a new rule recently restricting qualifying times to those less than seven per cent slower than the fastest time in the qualifying rounds. A similar rule, defining a floor value at and below which finishers will be awarded a single point would also make points above that floor dependent only on the runner's performance relative to the race winner.
    Here's an example, using the same three-runner races shown above, but with the 'floor' set at 50% more than the winning time.
    Formula (in row 2, then filled down)
    B2: =IF(LEN(A)>0,IF(A>1.5*MIN(A),1,1+(19)*(1.5*MIN(A)-A)/(1.5*MIN(A)-MIN(A))),"")
    Copied to column D, the A references are replaced with D.
    Conversion to integer values would use the same modifications as shown above.
    The results seem a fairer reflection of the second and third place times wrt the winning times in the two races.
    B.

  • How to find tables from transactions

    Hi All,
    Please tell me in which tables I can see customer heirarchy(i.e.VDH2N)? I would like to know all tables in which heirarchy 1 ,2 and 3  is stored?
    Also let me know how to find table names from transactions or after going to transaction screen?
    Thanks
    Yogesh

    Hi,
    Please check table KNVH.
    Also you can use BAPI BAPI_CUSTOMER_GET_CHILDREN to get child customers for a customer.
    FORM get_child_customers USING iv_cust_no TYPE kna1-kunnr.
    * BAPI to get the all Child Customers of the current Customer
    CALL FUNCTION 'BAPI_CUSTOMER_GET_CHILDREN'
    EXPORTING
    valid_on = sy-datum
    custhityp = 'A' ( Customer hierarchy type 'A', ... etc.. )
    node_level = '00' (node level)
    customerno = iv_cust_no ( customer number )
    TABLES
    node_list = gt_output. ( get the child customers in the list)
    ENDFORM. " get_child_customers
    Regards,
    Ferry Lianto

  • How to join tables from different databases (DBLink/DB connection )

    Hello,
    i have an issue and i hope you could help me to solve it. My problem is: I want to create native sql select which joins two tables from different DB (both of them are ORACLE, one of them internal, another one - external). I have found several notes and posts, but without any success. Db connection exists in dbcon table, so this part of my problem has been solved.
    I would like something like that:
    select * from table1@xxx inner join table2.
    i can not split this select into two separate ones, because both tables store over 30 mln. entries and i do not want to create any copies of them.
    Br,
    dez

    Hi,
    you might need to create a DB-Link on DB level and use EXEC SQL.
    Lots of stuff on google about this, like
    Oracle DBLink ( external database )
    Volker

  • How to access tables from multiple schemas

    Hi,
    I have access to 2 different schema (schema_a, Schema_B) through my APEX environment... I have a query that's based on tables from both the schemas... something like this
    select SCHEMA_A.table1.column1, table2.column2
    from
    SCHEMA_A.table1, table2
    it is giving me a message that table doesn't exist.
    Please advice.
    Thanks

    You need to grant the required permission (if there is no restriction then you can use GRANT ALL), You can give the permission to particular user on the schema.
    conn / as sysdba
    grant select on userA.table_name to userB;
    connect userB/passwordB
    select userA.table1.column1, table2.column2
    from
    userA.table1, table2;Refer these links,
    https://forums.oracle.com/forums/thread.jspa?threadID=616903
    http://www.techonthenet.com/oracle/grantrevoke.php_
    Thanks
    Lakshmi

  • How to remove/delete from a mysql table

    Hello!
    Please can someone help me with this one; I need to remove/delete a a row in a mysql table. When I use the query below, it removes this line from other tables containing the same numbers too. I only want to remove it from this table alone
    String update= ("DELETE FROM info WHERE Number = '" + Nr + "' AND week= " + week+ ");
    THX

    I don't understand this. You're saying that running this query removes values from other tables besides your info table? I don't believe it.
    One thing I'd caution you on is using names like "info" and "number" for tables and columns. They sound suspiciously close to keywords for your database. You'd be better off using less generic, more application specific names.
    But I don't think that explains the behavior you're describing. Either this is a very serious bug in MySQL or a very serious misunderstanding on your part.

Maybe you are looking for

  • Error message FI 759: Fund does not exist in FM area

    Hill! I have to make a distribution in CO-OM (tr KSV5) according to fund But if I customize fund as sender, choose fund from the fund catalog  and make a formal chek of cycle I see an error message FI 759: Fund does not exist in FM area. How can I ma

  • Imac 2009  Intel Processor - Wired Mouse Question

    In a nutshell, since I have purchased my imac my wired mac mouse has been acting strangely where my desktop screen suddenly fills up with expose type screens. eg i go into preferences mouse settings then suddenly i get a pinkish background and other

  • Onetime vendor - address is not copied into the purchase order ME21N

    Dear all, I have a issue about using onetime vendors, if I have entered a dummy address on the onetime vendor, this address is not copied into the prucase order when I create a PO for this vendor type. My problem is that we want to use the ME59 to cr

  • Muvo^2 FM (5gb) scandisk prob

    I saw an earlier post that had the same problem as me, but there was no follow up answer. Anyway, my problem is that when I start my Muvo up, it says that smartscan failed, and that I should press the menu button to go into recovery mode. I then sele

  • IR search

    HI Experts, I'm using apex 4.1, I have a IR on a page. Is there anyway IR can search on a column value which in not displayed on the report UI ? (something like control break, which we can apply on a column even its not shown in the IR) ?