Update array value into database

Hi, I would like to enquire if there is any way to update an array in the database.
As an example, i have an array which contain the value of the operating hour. I am able to insert the array value successfully into the database. Now i have problem to update the database, for these arrays.
Any suggestion will be very much appreciated.
Thank you in advance.

fizRiani wrote:
the field type is a string arrayReally? Have never seen that before in databases. Aren't you confusing database field type with Java object type?
the actual data represent the different operating hour that has to be inserted and updated to the database.I would rather use a chain table. Read on about database normalization.

Similar Messages

  • Combo box in JavaScript and store the combo box values into database

    i am a developer, i have a task ie.. i have combo box in JavaScript and i have to store the combo box values into database through JavaServerPage..
    i please every one to have a look on this and please reply soon....

    dear sir,
    your suggestions are really greater the god.............
    i have applied as you said , now i am the page as updated and also i nform you that its multi select ....
    i will show the codings , then u will get a clear identification
    <script language= "JavaScript">
    <!--
    function one2two() {
        m1len = m1.length ;
        for ( i=0; i<m1len ; i++){
            if (m1.options.selected == true ) {
    m2len = m2.length;
    m2.options[m2len]= new Option(m1.options[i].text);
    for ( i = (m1len -1); i>=0; i--){
    if (m1.options[i].selected == true ) {
    m1.options[i] = null;
    function two2one() {
    m2len = m2.length ;
    for ( i=0; i<m2len ; i++){
    if (m2.options[i].selected == true ) {
    m1len = m1.length;
    m1.options[m1len]= new Option(m2.options[i].text);
    for ( i=(m2len-1); i>=0; i--) {
    if (m2.options[i].selected == true ) {
    m2.options[i] = null;
    //-->
    </script>
    <form method="POST" name="theForm" action="update.jsp">
    <table bgcolor="white" border="1" cellpadding="5" cellspacing="2" align="center">
    <tr><td align="center">
    <select id=menu1 size=10 multiple>
    <option>javascript</option>
    <option>php</option>
    <option>Zeo</option>
    <option>asp</option>
    <option>jsp</option>
    <option>ajax</option>
    <option>struts</option>
    </select>
    <p align="center"><input type="button" onClick="one2two()" value=" >> "></p>
    </td><td align="center">
    Languages you know:<BR>
    <SELECT NAME="language" multiple>
    <OPTION VALUE="c">C
    <OPTION VALUE="c++">C++
    </SELECT>
    <p align="center"><input type="button" onClick="two2one()" value=" << " ></p>
    </td></tr></table>
    <center><input type="submit" value="update"></center>
    </form>
    <h4><u>Back<h4>
    <script language= "JavaScript">
    var m1 = document.theForm.menu1;
    var m2 = document.theForm.language;
    </script>
    </body>
    </html>

  • How to insert or update multiple values into a records of diff fields

    Hai All
    I have to insert or update or multiple values into a single records of diff fields from one to another table.
    Table1 has 3 fields
    Barcode bardate bartime
    0011 01-02-10 0815
    0022 01-02-10 0820
    0011 01-02-10 1130
    0022 01-02-10 1145
    0011 01-02-10 1230
    0022 01-02-10 1235
    0011 01-02-10 1645
    0022 01-02-10 1650
    these are the times that comes in at 0815 and goes break at 1130 and comes in at 1230 and goes home at 1645
    from these table i have to insert into another table called table2
    and the fields are barcode, date,timein intrin,introut,tiomout
    And the output want to like this
    barcode timein intrin introut timeout date
    0011 0815 1130 1230 1645 01-02-10
    0022 0820 1145 1235 1650 01-02-10
    If any give some good answer it will be help full..
    Thanks & Regards
    Srikkanth.M

    SQL> with table1 as (
      2  select '0011' Barcode,'01-02-10' bardate,'0815' bartime from dual union
      3  select '0022','01-02-10','0820' from dual union
      4  select '0011','01-02-10','1130' from dual union
      5  select '0022','01-02-10','1145' from dual union
      6  select '0011','01-02-10','1230' from dual union
      7  select '0022','01-02-10','1235' from dual union
      8  select '0011','01-02-10','1645' from dual union
      9  select '0022','01-02-10','1650' from dual
    10  )
    11  select barcode, bardate,
    12         max(decode(rn,1,bartime,null)) timein,
    13         max(decode(rn,2,bartime,null)) intrin,
    14         max(decode(rn,3,bartime,null)) introut,
    15         max(decode(rn,4,bartime,null)) timeout from (
    16                          select barcode, bardate, bartime,
    17                                 row_number() over (partition by barcode, bardate
    18                                                    order by bartime) rn
    19                            from table1)
    20  group by barcode, bardate;
    BARC BARDATE  TIME INTR INTR TIME
    0011 01-02-10 0815 1130 1230 1645
    0022 01-02-10 0820 1145 1235 1650Max
    http://oracleitalia.wordpress.com

  • How to edit and update table control into database?

    I am doing table control. Here are my codes:
    *& Report  ZHERA_TABLE2
    REPORT  ZHERA_TABLE2.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'ZTABLE_CONTROL'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES:   ZHERA.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'ZTABLE_CONTROL'
    TYPES: BEGIN OF T_ZTABLE_CONTROL,
             NAME LIKE ZHERA-NAME,
             AGE LIKE ZHERA-AGE,
           END OF T_ZTABLE_CONTROL.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'ZTABLE_CONTROL'
    DATA:     G_ZTABLE_CONTROL_ITAB   TYPE T_ZTABLE_CONTROL OCCURS 0,
              G_ZTABLE_CONTROL_WA     TYPE T_ZTABLE_CONTROL. "work area
    DATA:     G_ZTABLE_CONTROL_COPIED.           "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'ZTABLE_CONTROL' ITSELF
    CONTROLS: ZTABLE_CONTROL TYPE TABLEVIEW USING SCREEN 1000.
    START-OF-SELECTION.
    CALL SCREEN 1000.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE_CONTROL'. DO NOT CHANGE THIS LI
    *&SPWIZARD: COPY DDIC-TABLE TO ITAB
    MODULE ZTABLE_CONTROL_INIT OUTPUT.
      IF G_ZTABLE_CONTROL_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'ZHERA'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_ZTABLE_CONTROL_itab'
        SELECT * FROM ZHERA
           INTO CORRESPONDING FIELDS
           OF TABLE G_ZTABLE_CONTROL_ITAB.
        G_ZTABLE_CONTROL_COPIED = 'X'.
        REFRESH CONTROL 'ZTABLE_CONTROL' FROM SCREEN '1000'.
      ENDIF.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE_CONTROL'. DO NOT CHANGE THIS LI
    *&SPWIZARD: MOVE ITAB TO DYNPRO
    MODULE ZTABLE_CONTROL_MOVE OUTPUT.
      MOVE-CORRESPONDING G_ZTABLE_CONTROL_WA TO ZHERA.
    ENDMODULE.
    Screen 1000 codes:
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'ZTABLE_CONTROL'
      MODULE ZTABLE_CONTROL_INIT.
    *&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_COL_ATTR.
      LOOP AT   G_ZTABLE_CONTROL_ITAB
           INTO G_ZTABLE_CONTROL_WA
           WITH CONTROL ZTABLE_CONTROL
           CURSOR ZTABLE_CONTROL-CURRENT_LINE.
    *&SPWIZARD:   MODULE ZTABLE_CONTROL_CHANGE_FIELD_ATTR
        MODULE ZTABLE_CONTROL_MOVE.
      ENDLOOP.
    MODULE STATUS_1000.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'ZTABLE_CONTROL'
      LOOP AT G_ZTABLE_CONTROL_ITAB.
        CHAIN.
          FIELD ZHERA-NAME.
          FIELD ZHERA-AGE.
        ENDCHAIN.
      ENDLOOP.
    *&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE ZTABLE_CONTROL_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_1000.
    Please show me where to put my codes to edit(edit directly on table control fields) and update my table control(using the 'save' button)?

    Hi,
    You have to put the following code in the PBO of screen 1000.This code would make the fields editable to make changes in the table control fields directly.
    Here there are 3 transactions.For create and change transactions, the fields will be in editable mode and for display transaction,they will be non editable mode.
    DESCRIBE TABLE tb_line LINES lin.    " tb_line is the name of the internal table for the table control
      tcl_item-lines = lin.                             '' lin hold the number of lines of the internal table
    CASE sy-tcode.
        WHEN 'ZCREATE09' OR 'ZCHANGE09'.
    ***Checking if the table control is empty or not***
          IF lin NE 0.       
            LOOP AT SCREEN.
    ***To make the screen editable****
              screen-input = 1.
            ENDLOOP.
          ELSE.
            LOOP AT SCREEN.
              IF screen-name CS 'TB_LINE'.
    ****To make the screen non-editable if no values are present in the
    ***table control****
                screen-input = 0.
                MODIFY SCREEN.
              ENDIF.
            ENDLOOP.
          ENDIF.
    Once the fields are edited and the save button is pressed,the entered values have to be populated into the Z tables.The code has to written in the PAI of the screen 1000.Here the values from the work area of the internal table are moved into the Z Table. The code will be.
    LOOP AT tb_line.
        ztm09_ekpo-ebeln = ztm09_ekko-ebeln.  "ztm09_ekko and ztm09_ekpo are the names of the Z Tables.
        ztm09_ekpo-ebelp = tb_line-ebelp.   
        ztm09_ekpo-matnr = tb_line-matnr.
        ztm09_ekpo-menge = tb_line-menge.
        ztm09_ekpo-meins = tb_line-meins.
        ztm09_ekpo-netpr = tb_line-netpr.
        ztm09_ekpo-waers = tb_line-waers.
    *****Update the entries into item table*****
        MODIFY ztm09_ekpo.
      ENDLOOP.
    Reward if helpfull
    Thanks,
    Kashyap

  • Updating tableview back into database table

    I am trying to display a recordset from mysql database table into a tableview in javafx. Maybe let's say get all records where invoice number is 101 i n the master table from the child records in the child table.(This is a typical master detail scenario.) After this I update the tableview add, delete, edit some records AND then I want to save this Tableview or rather update it back, synchronise into the database table.
    I request you to kindly help with sample code or any guidelines that will help me in this objective.

    Here is the tutorial of tableView : http://docs.oracle.com/javafx/2/ui_controls/table-view.htm
    You can use the Java Class that mapped the database for ObservableList. Get all the record in the database and cover it to the java object. Then add them to the ObservableList to show on TableView. After add, update, edit,... Get the item in the ObservableList and update back to your database.
    I can't tell in detail. You should try this tutorial and if there are any more Specific Issue you can post another question here.

  • How to insert column values into database as rows

    Hi,
    I have 8 columns and some not null columns. Based on not null columns I want to insert into table as rows. The 8 columns may contain values or no value. If the first column contains data, then I have to insert into one row. if the second column contains data I have to insert a row and in second column. respectively...So How can I insert column values into rows. Can I write 8 insert statements. (OR) is it possible to insert data from columns using where clause.
    Please help me out....
    Thanks in Advance

    Lines Table:
    line_id, orcl_bank_account_num, product_type, service_type, lease_type,
    funding_type, cpi, billing_frequency_unit_cd , annual_due_date ,
    pricing_start_date, pricing_end_date, install_date, contract_end_date ,
    prdct_replacement_cost_amt, cradle_replacement_amt, supranet_contract,
    issuance_fee, board_inactive_date, header_id, creation_date, last_modified_date,
    created_by_nam, modified_by_nam, activeinactive_flg, prdct_bill_amt_yr1,
    prdct_bill_amt_yr2, prdct_bill_amt_yr3, prdct_bill_amt_yr4, prdct_bill_amt_yr5,
    prdct_bill_amt_yr6, prdct_bill_amt_yr7, prdct_bill_amt_yr8, activation_fee_yr1,
    activation_fee_yr2, activation_fee_yr3, activation_fee_yr4, activation_fee_yr5,
    activation_fee_yr6, activation_fee_yr7, activation_fee_yr8,
    In this table the columns structure is :
    -- PRDCT_BILL_AMT_YR (1 to 8) NUMBER(14,4)
    -- ACTIVATION_FEE_YR (1 to 8) NUMBER(8,2)
    I have one more table:
    PRDCT_INS_AMT               NUMBER(14,4)
    ACTIVATION_FEE_AMT          NUMBER(14,4)
    I want to insert prdct_bill_amt_yr (1 to 8) columns data into PRDCT_INS_AMT column. similarly activation_fee (1 to 8) columns data.
    But the data should be inserted based product_type, service_type, lease_type columns values. (These 3 columns may contain upto 45 combinations).

  • How to Insert check box value into database column

    Hi All,
    I had checkbox group in a region which is using an LOV......and having 18 items in that lov.
    i.e. Total 18 checkboxes in Total. User has to select only 2 checkboxes from that 18.
    I created two columns for storing two values of checkboxes. How to insert two selectives in two columns.........Moreover, How to give the query i.e. how to know which values are selected.
    Please Help me in achieving this. apart from the two columns (Focus1,Focus2) .......One more column(l_spo_val) is there which is a foreign key.
    My Insert Statement is like this:
    INSERT INTO SPO_RESEARCH_FOCUS VALUES(l_spo_val
    ,:P4_RESEARCH_LIST_1
                        ,:P4_RESEARCH_LIST_2);
    Please narrate the code if possible.
    Thanks,
    Sekhar.

    Hi Denes,
    I saw the example in your workspace and it is the same what exactly i want and instead of storing in one column i want to store the two selected values into two different columns. Also i need to restrict the selection of checkboxes upto 2 only. So If the user tries to select the third check box it doesnt have to accept.
    Even I am ready to change my table as according to your example i.e. creating only one column. Store the values of selection into that column.
    I was unable to see how u wrote the logic (Code) for your example in your workspace. It helps alot if you provide me the code for that example(Multi Checkbox One Column).
    I was facinated after watching your examples in your workspace and am very much interested to know more about Apex.
    Please help me insolving this as it is long pending issue for my requirement.
    Thanks a lot again,
    Sekhar.
    Edited by: Sekhar Nooney on Mar 26, 2009 4:35 AM

  • Send Email and automatically save new value into database

    Hi,
    I think this is a very unique problem, hope that anyone could help me. I tried to send email notification using pl/sql block (check_delay) as below. Please focus to this section first, from the pl/sql:
    Problem 1
    --> if emp_rec.OVERDUE_AMOUNT_PAID is not null then
    dbms_output.put_line('emp_rec.payment_progress_id ' || emp_rec.payment_progress_id || crlf);
    select c.PAYMENT_PROGRESS into payment_progress from credit_sales c where c.PAYMENT_PROGRESS_ID = emp_rec.payment_progress_id;
    payment_ratio := (payment_progress/emp_rec.invoice_amount);
    dbms_output.put_line('count ratio progress payment to invoice amount ' || payment_ratio || crlf);
    dbms_output.put_line('payment progress ' || payment_progress || crlf);
    Here, sql checks whether overdue amount is being paid in progress from payment_overdue table..then creates variables for ratio(payment_ratio) and progress payment amount(payment_progress). After that if payment_ratio < 0.1 it must sends email notification to customer_id and customer_representative_id. However, it does NOT send notification to
    customer_id! How do I amend the code so that customer_id will get the notification too?
    Problem 2
    In problem 2, please focus to :
    -->if emp_rec.OVERDUE_AMOUNT_PAID is null then
    If customer does not pay any amount, sql will first checks whether delay between scheduled payment date and current system is more than 3 days..
    dbms_output.put_line('count days delay ' || round(sysdate - to_date(emp_rec.scheduled_payment_date)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.scheduled_payment_date)) >3 then
    After that, sql will counts how many times customer delays. If first time, the notification will count notification as number 1..and update remark column with the message and count value as below..
    select count(a.payment_overdue_id) as count into count from payment_overdue a where a.customer_id = emp_rec.CUSTOMER_ID and a.invoice_no = emp_rec.invoice_no;
         dbms_output.put_line('update remark : '||emp_rec.remark);
    update PAYMENT_OVERDUE set remark='Reminder notice no '||count where payment_overdue_id=emp_rec.payment_overdue_id;
    Finally, notification to be sent to customer with the message format as below..
    email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to make payment for Invoice No '||invoice_no;
    mesg:='Kindly make payment for your amount outstanding as per Invoice No '||invoice_no||'. Reminder notice no '||count;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    Unfortunately, no email notification being sent to customer with this message format.. Please help me to make customer to receive the notification with this format.
    Kindly, thank you so much for you guys to help me solve these two problems, Problem 1 and Problem 2....
    Thank you.
    CREATE OR REPLACE PROCEDURE TEST.check_delay AS
    NO binary_float;
    CURSOR emp_cur is
    select * from PAYMENT_OVERDUE where FLAG=3 and STATUS='OUTSTANDING';
    emp_rec emp_cur%rowtype;
    email_to varchar2(200);
    default_email varchar2(200);
    mesg varchar2(4000);
    invoice_no varchar2(100);
    subj varchar2(4000);
    payment_progress binary_float;
    payment_ratio binary_float;
    count number;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    BEGIN
    default_email:='@test.com';
    FOR emp_rec in emp_cur
    LOOP
    if emp_rec.OVERDUE_AMOUNT_PAID is null then
    dbms_output.put_line('count days delay ' || round(sysdate - to_date(emp_rec.scheduled_payment_date)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.scheduled_payment_date)) >3 then
         select count(a.payment_overdue_id) as count into count from payment_overdue a where a.customer_id = emp_rec.CUSTOMER_ID and a.invoice_no = emp_rec.invoice_no;
         dbms_output.put_line('update remark : '||emp_rec.remark);
    update PAYMENT_OVERDUE set remark='Reminder notice no '||count where payment_overdue_id=emp_rec.payment_overdue_id;
         email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to make payment for Invoice No '||invoice_no;
    mesg:='Kindly make payment for your amount outstanding as per Invoice No '||invoice_no||'. Reminder notive no '||count;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    if emp_rec.OVERDUE_AMOUNT_PAID is not null then
    dbms_output.put_line('emp_rec.payment_progress_id ' || emp_rec.payment_progress_id || crlf);
    select c.PAYMENT_PROGRESS into payment_progress from credit_sales c where c.PAYMENT_PROGRESS_ID = emp_rec.payment_progress_id;
    payment_ratio := (payment_progress/emp_rec.invoice_amount);
    dbms_output.put_line('count ratio progress payment to invoice amount ' || payment_ratio || crlf);
    dbms_output.put_line('payment progress ' || payment_progress || crlf);
    if payment_ratio < 0.1 then
    email_to:=emp_rec.customer_id||default_email;
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    email_to:=emp_rec.customer_representative_id||default_email;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    if (payment_ratio < 0.5 && payment_ratio > 0.1) then
    select b.INVOICE_NO into invoice_no from INVOICE b where b.INVOICE_ID = emp_rec.INVOICE_ID;
         email_to:=emp_rec.customer_id||default_email;
    subj:='Reminder to settle outstanding amount for Invoice No '||invoice_no;
    mesg:='Kindly settle your outstanding payment as per Invoice No '||invoice_no;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    END LOOP;
    END;
    /

    Hi BownieCross;
    If you are using a local database file in your project the following may be the cause.
    From Microsoft Documentation:
    Issue:
    "Every time I test my application and modify data, my changes are gone the next time I run my application."
    Explanation:
    The value of the Copy
    to Output Directory property is Copy
    if newer or Copy
    always. The database in your output folder (the database that’s being modified when you test your application) is overwritten every
    time that you build your project. For more information, see How
    to: Manage Local Data Files in Your Project.
    Fernando (MCSD)
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects
    and unknown namespaces.

  • PreparedStatement.setFloat does not enter precise values into database

    Hi
    I have written a program where I am entering a record in to the
    database using a prepared statement. The problem is for float datatypes, the
    values being entered into the database are not rounded off. e.g. 1.65 is
    being entered as 1.64999999
    I am using the Sybase database and the driver is
    com.sybase.jdbc2.jdbc.SybDriver.
    If I replace PreparedStatement with Statement I am getting the precise values
    Regards
    Sudeep

    SOME THINGS YOU SHOULD KNOW ABOUT FLOATING-POINT ARITHMETIC
    What Every Computer Scientist Should Know About Floating-Point Arithmetic
    Beat yawmark to it :-)

  • How to updated the data into Database table

    Hi Guy's,
    Please help me Using Tabstrip control how to updated the related infotype records into related database table.
    Thanks and Regards,
    Sai.

    Hi Guy's,
    Please help me Using Tabstrip control how to updated the related infotype records into related database table.
    Thanks and Regards,
    Sai.

  • Urgent help with HTML/arrays/insert into database through a bean

    I am currenly building an application that dynamically lists subjects and developers from a database. This list is used as a questionaire to ask developers what subjects will they be interested in attending or teaching. I having problem passing this data into the database on the bean level.
    I need help I have been working on this for months. I can explain further. I need to prove to my boss that I can do this project but i am currently stuck.

    Split your requirements into small pieces and ask them one by one, you will certainly get help here. But please make sure that you will do your home/office work.

  • Need help on inserting multiple selection values into database

    Hello every body,
    we are developing one small web application in that we have requirement like department is an combobox, services in multiple selection list box, suppose when i select IT as department & some services in multiple listbox on clicking map button selected services should be map with that department .Could u plz help me how i have to do..?
    Thanks & Regards,
    Anil.

    anilmekala.reddy wrote:
    Hello every body,
    we are developing one small web application in that we have requirement like department is an combobox, services in multiple selection list box, suppose when i select IT as department & some services in multiple listbox on clicking map button selected services should be map with that department .Could u plz help me how i have to do..?
    Thanks & Regards,
    Anil.if you give more details .... do you know how to use jdbc ??? prepared statement ???
    any way if I have understood your question
    I will suppose that you have 3 tables Department ,service and Has_service
    and I supose that you have already the entry in table department and service
    Here is what I would do ...
    while(I have something to insert )
       insert into Has_service values (department,service )
    }

  • Updating ARRAYs in the Database

    Hi,
    I'm having serious trouble with the code below. I'm attempting to create a method
    in the SQL bean that will pass an Array to an Oracle function.
    I have followed WebLogic's documentation on this, but I get the following error
    when I run the code:
    Problem in descriptor: Unsupported feature
    ------> EXCEPTION in setProspectsInfo: Invalid argument(s) in call
    Any suggestions?
    public void setProspectsInfo(Customer mycustomer) throws Exception {
    CallableStatement cssn = myConn.prepareCall("{call ? := pkg_prospects.fn_ProspectsMain(?)}");
    try{
    Vector myVector = new Vector();
    myVector.addElement(mycustomer.getUniqueIdStr());
    //myVector.addElement(null);
    myVector.addElement(mycustomer.getFirstName());
    myVector.addElement(mycustomer.getLastName());
    myVector.addElement(mycustomer.getMiddleInitial());
    myVector.addElement(mycustomer.getApartmentNumber());
    myVector.addElement(mycustomer.getBestTimeToCall());
    myVector.addElement(mycustomer.getCity());
    //myVector.addElement(mycustomer.getContactNote());
    myVector.addElement(mycustomer.getDaytimePhone());
    myVector.addElement(mycustomer.getEmailAddress());
    myVector.addElement(mycustomer.getHomePhone());
    myVector.addElement(mycustomer.getMailingAddress1());
    myVector.addElement(mycustomer.getMailingAddress2());
    myVector.addElement(mycustomer.getSocialSecurityNumber());
    myVector.addElement(mycustomer.getState());
    myVector.addElement(mycustomer.getTitle());
    myVector.addElement(mycustomer.getZipCode4());
    myVector.addElement(mycustomer.getZipCode5());
    myVector.addElement(mycustomer.getBorrowerType());
    String[] myStrings = new String[myVector.size()];
    myStrings = (String[]) myVector.toArray(myStrings);
    weblogic.jdbc.vendor.oracle.OracleArray myArray = null;
    try {
    //oracle.sql.ArrayDescriptor myDesc = oracle.sql.ArrayDescriptor.createDescriptor("STRARRAY",
    myConn);
    //myArray = new ARRAY (myDesc, myConn, myStrings);
    //myArray.toString();
    myArray = (weblogic.jdbc.vendor.oracle.OracleArray) cssn.getArray("STRARRAY");
    //myArray.toString();
    } catch (Exception e) {
    System.out.println("Problem in descriptor" + e.getMessage());
    cssn.registerOutParameter(1, OracleTypes.NUMBER);
    cssn.setArray(2, myArray);
         cssn.execute();
    catch ( Exception e ){
    System.out.println("------> EXCEPTION setProspectsInfo" + e.getMessage());
    throw new Exception(e);

    "Slava Imeshev" <[email protected]> wrote in message news:[email protected]..
    "Mike Flowers" <[email protected]> wrote in message news:[email protected]..
    public void setProspectsInfo(Customer mycustomer) throws Exception {
    CallableStatement cssn = myConn.prepareCall("{call ? := pkg_prospects.fn_ProspectsMain(?)}");
    try{
    Vector myVector = new Vector();
    myVector.addElement(mycustomer.getUniqueIdStr());
    //myVector.addElement(null);
    myVector.addElement(mycustomer.getFirstName());
    myVector.addElement(mycustomer.getLastName());
    myVector.addElement(mycustomer.getMiddleInitial());Totally apart from question why it doesn't work - passing parameters
    to a stored procedure is not such a good idea and in fact it'is very
    error prone.I meant passing parameters to an SP the way you do.
    Slava

  • Problem in storing float value into database form C++ thru OCCI

    Hi,
    We are working on a project where numerical accuracy is crucial. As per our client required float data like 23.12345678 should be stoted and retrieved back accurately from C++ application.
    We are using OCCI interface in C++ application. At the time of executing the query, we are moving the float value to host variable using setFloat() function. But oracle storing truncated or rounded value. Not exactly what we are proving.
    Even we are not able store 22.22 also properly. In oracle column is defined as NUMERIC.
    Its working fine, when we insert data from sql command promt by running a query. I guess we are missing some this in this process.
    Please provide us any suggestions on this. It would be great if you can provide some sample code.
    Regards,
    Newbe

    OTN has a C/C++ forum. Please delete this post and post your inquiry there.
    Thank you.

  • Updating array data in sql database

    HI,
    Im facing problems in updating array data in SQL database.
    As of now, i am able to write an "insert" query and insert array data in an image datatype field. Im using image datatype because the array size is very big(around 80,000 x and y values).
    Althoug inserting data is easy im unable to write a query to update this data.
    Referring to the help of SQL server and Labview database connectivity toolkit, i came across a method of accessing image datatype....using textpointers, which are 16 bit binary values and using the WRITETEXT function instead of the UPDATE function.
    but the problem im facing is that ive to pass the array as a 2d string array in the query as a result the updated array is retrieved in the form of a string a
    nd not as an array. how do I get over this problem?

    Hi Pavitra,
    I'm not very clear on how you have inserted the data into your application, but I do know that when you call the UPDATETEXT or WRITETEXT function you use the TEXTPOINTERS to point to the first location of a 1d array. So, depending on how you've stored the data, you may have problems updating your data if you're looking at it as a 1d array instead of how you originally formatted it. If you are able to successfully access the data as a 1d array, you can use the database variant to data type vi and pass in a string array constant for the data type. This will convert the variant datatype into whatever you specify. You may have to index the row and column of the variant (you receive a 2d array of variant) first before you convert. If possible, can yo
    u provide some more detail and maybe some example code of how you perform the insert and plan to do the update? I can probably give you a better solution if I know how you are formatting the data. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

Maybe you are looking for

  • Maintenance Plan - Multiple Frequencies

    Hey, I need to create a Maintenance Plan with multiple items and multiple frequencies.  Is this possible ie. 1 x Maintenance Plan 2 x Items Item 1 - 2months Item 2 - 6monhths. What I want is for the 2 monthly to come out twice and then when the 6 mon

  • 'dd-mm-yyyy hh24:mi:ss ' convertion

    '20061106024500' i want to convert it into 'dd-mm-yyyy hh24:mi:ss format how will i do this.

  • Missing special characters

    I'm using InDesign CS6 on Windows 7, and I have a problem with special characters like č, ę etc. When I open an InDesign document that contains those characters, I see little pink square symbols with a cross, instead of those characters. The font I'm

  • Intermittent exception - Load Report Failed

    Hi, I am new to the forums, this does kinda involve .Net but not be a simple .Net issue so I posted here. I have been using Crystal Reports 10 for a while now, bolting it into web pages and never had issues but I have come across 2 lately that have m

  • Ibook suddenly marks photos with yellow exclamation mark

    Hi, I have created several photo albums and had them published. I have always chosen my photos carefully to avoid the yellow exclamation mark. One of my projects was started several months ago and left untouched for a long time. When I went back to t