Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    bangalore
    Posts
    12

    Unanswered: How to save the value of a text box that has been edited and not the others in d2k?

    Hi,

    I have 3 textboxes and a SAVE button in D2k.

    My Question is : How do I determine which

    text box has been edited and save the value of
    that textbox alone in the DB.

    I know that I can use a POST-TEXT-ITEM Trigger
    on the textboxes which can do the saving of specific edited textboxes.

    But if I have, say a 100 text boxes then it
    would not be feasible for me to write
    a POST-TEXT-ITEM trigger on each and every text
    box.

    Also I would like the saving to be done after I
    hit on the SAVE button, so that it is easier
    for the end user to understand instead of a
    POST-TEXT-ITEM trigger which would be fired automatically after an edit.

    Is there a easy way of doing this?

    Thanks
    Sharath.

  2. #2
    Join Date
    Jan 2004
    Location
    TamilNadu,India
    Posts
    1

    Same Prob

    Hi friend,

    I am also face the same prob.So do u obtain the ans plz tell me.

  3. #3
    Join Date
    Jan 2004
    Location
    India
    Posts
    62

    Question

    I am not sure, Why do you want to save only edited items ? What happens if you just overwrite the fields to database that have not been edited too?
    Another question is , you must be using Oracle with d2k. So when you press save button you must be writing commit comand.
    So what happens? Won't it update the databsee by itself ?
    Regards,

    Rushi

  4. #4
    Join Date
    Dec 2003
    Location
    INDIA
    Posts
    3
    hi friend,

    u can define a parameter in the current form.

    write this trigger in BLOCK LEVEL .... post_text_item


    declare
    l_name varchar2(100);
    begin

    : parameter.l_name := get_item_property(:system.trigger_item, ITEM_NAME);
    end;

    and in the save button write this code

    declare
    l number;
    begin
    l := name_in(: parameter.l_name);

    insert into emp
    (empno)
    values
    (l);
    commit;
    end ;

    i think this will solve u r problem


    regards

    gigi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •