Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    5

    Unanswered: FRM-40657 - Record Change by another User (Developer 6i )

    Hello to you all,
    I've got the following problem :

    My form in developer 6i consists of two blocks (there were more but I deleted them in order to find out the reason for the frm-40657-error).
    The first block is the master-block of the second.

    When I create a new master-record in the first block - this works fine.

    when I then select the next block to enter detail-data (based on an other table) I can enter some data and on a 'commit' the message '1-record succesfully saved' shows up.
    But, on trying to change any item of the actual record -the data still being displayed on the window - the error frm-40657 turns up.... a further display of the error-message returns the oracle error ora-01403:no data found.
    The same error turns up when I select another block based on another table and try to enter data in this block....

    In the end, no record was saved in the detail table at all.

    The join of master-slave uses the primary key of both tables,
    both tables have got some more fields than used in the blocks.
    There are no not null-Constraints besides the primary-key-field.
    I disabled every block/field-trigger doing more than a next_field - operation. more over, I'm the only one working with the tables....

    any idea where else i've to look ???!!!


    Thank you a lot for any help
    Susanne

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    To correct FRM-40657, assign the database ROWID pseudocolumn to the ROWID of the queried record in the form.
    For example: ------------ Using a SELECT statement:
    SELECT ROWID, db_column2 INTO :block_name.ROWID, :block_name.field2
    FROM table_name
    WHERE db_column1 = :block_name.field1;
    Using a Cursor:
    DECLARE CURSOR c1 IS
    SELECT rowid, emp.*
    FROM emp;
    BEGIN
    FOR t IN c1 LOOP
    :emp.rowid := t.rowid; -- this line must be added
    :emp.empno := t.empno;
    :emp.dept := t.dept;
    ...
    SET_RECORD_PROPERTY( record_no, '<block_name>', STATUS, QUERY_STATUS); NEXT_RECORD;
    END LOOP;
    END;
    Solution Explanation: =====================
    Oracle assigns a unique ROWID column to each record in the database on insert. Without the ROWID Oracle Forms cannot access the record in the database, so the record appears to have been deleted or updated. Even though you can change the record status to QUERY to trick Oracle Forms into believing that the record has been queried and not inserted, the ROWID has not been selected for the record in the block. When a user updates a record, Forms compares the values on the form to the values in the database. As a result of ROWID, the record is not synchronized with the record in the database which produces the FRM-40657 error.
    ------------
    HTH & YMMV

  3. #3
    Join Date
    Jan 2013
    Posts
    1

    check this simple

    hello Dear ,

    I have the same problem ,I did the following steps and it solve it successfully ,
    1- insert that record using sql plus or Toad direct into database.
    2- commit
    3- go to your form and use it to update or insert your data normally.

    Also, thanks all for your help

Posting Permissions

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