Could no reserve record [2 tries], Keep trying?

Hi,
Once I retrieve a specific record from Receivables Transaction, I receive an error  Could no reserve record [2 tries], Keep trying?, Record successfully retrieve but with this error which prevent for further action such as Apply etc.
Please advise to fix
Thanks
RF

This usually shows when other user is using the same record in a different session, ask them to close the form, or wait until they save their changes. You could use the monitor users form to identify who the other user(s) are.
Now, this could also happen if there is a program modifying the records, so you would have for it to finish and the changes commited/rollbacked.

Similar Messages

  • Could not reserve record (2). Keep trying ?....

    This has to be a classic Oracle forms problem.
    I would like to replace that useless message by a more user friendly message when a user tries to update a record which is already locked by another user. I found the following solution in here using the on-lock trigger:
    Declare
    is_locked boolean := false;
    dummy VARCHAR2(2);
    Begin
    Begin
    Select null INTO dummy from mytable
    where rowid = :myblock.rowid
    for update nowait;
    exception when Others then
    If sqlcode = -00054 Then
    is_locked := True;
    End If;
    end;
    IF is_locked then
    Showmessage('Another user is updating this record. Try again later.');
    raise form_trigger_failure;
    End if;
    End;
    However, when I add that code, it seems to change the behavior of the locking process. For instance, If the record is locked by user A, user B gets the expected "Another user is updating..." as long as the record lock is active.
    When the user A commit the changes, user B is then able to change the data when he should have get the "Record has been updated by another user. Please re-query" message. Therefore, user A loses it's changes when user B does a commit.
    Any ideas why or any suggestions ?
    Thanks.

    Denis,
    You are only half-way there. Forms does TWO things in the on-lock trigger, it does the "select for update nowait" as you have coded, but it ALSO compares the values fetched into the record during the query with the current values in the database, by adding this to the where clause:
    where rowid=:blk.rowid and :blk.Col1=Col1 and :blk.Col2=Col2, and...
    (Not sure how they do it, but they have to handle null columns in the comparison, too.
    Now, due to the where clause, if any column was changed and committed by the other user, the select will return a no_data_found.
    If the ORA-00054 is detected, you get the "record is locked by another user... retry" message. But if select returns a no_data_found, you get the "Record has been updated by another user... Please re-query" message. (And it should be noted that at this point the record is now locked by the user getting the message, AND it cannot be updated by the user. Our forms here do a clear/rollback before the query so that the re-query process will unlock the row, but that is not the default in Forms.)
    The two messages come up so rarely in the real-world situations here, that I do not try to override the default processing. However, in special cases, I have written such code, but it is usually in other places, like during special commit processing where other tables and data need to be updated in addition to the base-table data. In those situations, it is quite a task to get everything working correctly.
    If you look at the on-line help on the "Lock the Row" topic, in the "continued" image, there is the process, "Has the row been changed or deleted by another operator" check. That is the clue to what you need to do in the second step.
    Message was edited by:
    Steve Cosner
    One additional note: I ran a trace to see the SQL statement that Forms actually issues, and it is not what I gave above. Instead, it is just a select of all the columns in the block, with just the rowid in the where clause, and with the for update clause. Forms apparently fetches all the column data, then compares the newly fetched values with the database_value of each column in the record.

  • Could not reserve record (2). Keep trying ?.... - More Details required

    Hi all,
    I would like to display the User who has locked the record.
    Is there any possibility to implement that?
    Thanks.

    create DB function:
    CREATE OR REPLACE FUNCTION record_locked_by (
       p_table    VARCHAR2,
       p_rowid    ROWID
       RETURN VARCHAR2
    IS
       v_locker        VARCHAR2 (100);
       resource_busy   EXCEPTION;
       PRAGMA EXCEPTION_INIT (resource_busy, -54);
    BEGIN
       EXECUTE IMMEDIATE    'select 1 from '|| p_table|| ' where rowid = :r for update nowait'
                   USING p_rowid;
       RETURN NULL;
    EXCEPTION
       WHEN resource_busy
       THEN
          SELECT se.username INTO v_locker
            FROM gv$lock lk, dba_objects ob, gv$session se
           WHERE lk.SID = se.SID
             AND lk.id1 = ob.object_id
             AND object_name = UPPER (p_table)
             AND lk.inst_id = se.inst_id
             AND audsid <> USERENV('SESSIONID');
          RETURN v_locker;
    END;Now in ON-LOCK trigger you can use this code (generic)
    DECLARE
       v_locker   VARCHAR2 (100);
    BEGIN
       v_locker :=record_locked_by (GET_BLOCK_PROPERTY (:SYSTEM.trigger_block,query_data_source_name),
                                    NAME_IN (:SYSTEM.trigger_block || '.rowid'));
       IF v_locker IS NOT NULL
       THEN
          MESSAGE (   'Record is being updated by '|| v_locker|| '. Please try again later');
          RAISE form_trigger_failure;
       ELSE
        lock_record;
       END IF;
    END;

  • How can I trap the question 'Could not reserve record (2 tries). Keep tryin

    How can I trap the question 'Could not reserve record (2 tries). Keep trying ?'
    How can I trap the question 'Could not reserve record (2 tries). Keep trying ?'
    I want to know the error_code for this question before the 40501 error code.
    Thanks for the help.

    See
    Could not reserve record (2). Keep trying ?....

  • Error Mesage is "Could not reserve record (2 tries) keep trying ?

    sir,
    when i running my form i m reciving this error message Error Mesage is "Could not reserve record (2 tries) keep trying ? " This is due to multi user Login, How can i avoaid from this error message.

    when you begin changing queried values, forms locks the record for other users by default. so this message appears if another user tries to change (lock) the same record. you have to wait until the locked record is commited or rolled back.

  • 'could not reserve record (2tries). keeping trying?'

    Dear All,
    i have prepared a new chart of account and
    when i am defining the qualifiers of segments then system generates this error 'could not reserve record (2tries). keeping trying?'
    please help
    Asad

    Pl post details of OS, EBS and database versions.
    This message is typically displayed when you are trying to update a row in the database that is locked by another session. Your DBA can determine who has locked this row. The other session will either have to release this row or the session needs to be terminated.
    HTH
    Srini

  • Could not reserve record (2 tries). keep trying ?

    I have a post-query trigger in which I modify the value of some based fields if they are null :
    if :my_block.item1 is null then
    :my_block.item1 := :my_block.item2;
    end if;
    The probelem : when 2 users are querying the same record, we have the error : could not reserve record (2 tries). keep trying ?
    We need that more than one user can query the same record (but of course not modifying it).
    Any help ?
    Thanks.

    I believe you want to set the locking mode property of the block to delayed, as long as the side effects are acceptable.
    As soon as the first person selects, and your post-query trigger fires setting item1 = to item2, a lock is placed since that is the default mode when data is changed.
    From 10g's online help:
    For most applications use the default setting of Automatic. The Immediate setting remains for compatibility with existing applications, but there is no reason to use it in new applications. Use Automatic instead. The Delayed setting is useful for applications that must minimize the number of locks or the amount of time that rows remain locked. Use delayed locking if the form's Isolation Mode property has the value Serializable. The main drawbacks of delayed locking are The changes an end user makes to a block may need to be redone at commit time. Another user's lock can force the first end user to choose between waiting indefinitely or abandoning the changes.
    Gary

  • Could not reserve record(n tries). Keep trying?

    Hi all,
    I am not getting the message "Could not reserve record(n tries). Keep trying?" when i have modified the same record in another session from the same form.
    What could be the problem?? any ideas?? will be greatly appreciated.
    ThankYou
    PVKiran

    what is your lock statement?
    LOCK TABLE XXX IN ROW SHARE MODE
    or
    SELECT ...FOR UPDATE will not issue any error message even if someone is holding the lock on the same record you are attempting to update.
    use NOWAIT will force the error out.

  • CAUTION MESSAGE on form: 'Could not reserve record [2 tries]. Keep trying?

    While entering the details on Assignment form, the screen froze and eventually it stopped responding due to which I had to close the application.
    Now I am not able to key in any info. I keep getting a CAUTION dialogue box with message *'Could not reserve record [2 tries]. Keep trying?'*

    The error suggests, the same record is being used by other users. If possible, bounce the database to release locks on the table. If not possible, you need to find the session that locked the table. And kill the session to release the lock.

  • Help:could not reserve record(2 tries) keep trying

    hi friends
    what is this message and when it occures?
    message: could not reserve record(2 tries) keep trying.
    thanks in advance.
    shoja

    That is just because the previous session of the form is still locking the records,
    solution ,
    close the previous form and try again
    or
    its also because the transaction has got aborted (ie, by pressing control alt delete in the front end) and active process still exsists in the backend , identify the process and kill it. Then open the form
    regards
    Rajesh
    hi friends
    what is this message and when it occures?
    message: could not reserve record(2 tries) keep trying.
    thanks in advance.
    shoja

  • "Could not reserve record (2 tries) Keep trying?" vs waiting

    We received our Forms 10g applications from a vendor, & are now taking over maintenance. We're coming across 2 possible scenarios when user A has a particular record locked. User B sees either:
    - a pop-up message which reads "Could not reserve record (2 tries) Keep trying?"
    - an hourglass until user B performs a commit or rollback
    Is there a property setting on the data block or something, which causes the first scenario to execute a "select * from table where PK = <> for update nowait" or something? We can't figure out how this is happening.
    Thanks,
    Chuck

    I didn't quite understood you question. Do you want to execute a select for update when a lock is obtained?? Do you want to avoid this message???
    If you want to execute a code, you can do it by tracking the database lock error, which is ORA-00054, you can use the ON-ERROR trigger and check the DBMS_ERROR_CODE and accordingly execute your own code.
    This is a general idea, you have to be more specific so we can help you in more details.
    If you want to avoid it, you can set the Block's "Locking Mode" to "Delayed", this will allow the second user to edit the record even if the first user has locked it but on commit will prompt to re-query the data since it has been changed.
    Tony

  • Could not reserve record(4 tries)

    Hello , I faced the following message being displayed from our application for last 4 days. I could not able to
    solve it. This is from an medical application working well for last 5 years. error is or warning is
    'COULD NOT RESERVE RECORD(4 TRIES) . kEEP TRYING?. It sounds like LOCKING . But how can i find the session
    locking a particular resouce and kill the session or whatever action. Kinldy help me experts please.

    This will give you an output like:
    LOCKED                           OUSER                SID
    OWNER.LOCKED_TABLE               LOCK USERNAME        '26,57010'and with the statement:
    alter system kill session '26,57010';you are able to kill the locking session.

  • Could Not Reserver Record(2 tries)

    Hi !
    -- Some time when i commit the record, the message appears
    "Could Not Reserve Record (2 tries), Keep trying"
    YES NO
    -- Please tell me about this error.
    -- May be due to locking of record.
    --I am using Forms 6i, with 10g.
    -- My application is multiuser, and all the users uses the common schema.
    Thanks!.

    Question:- Are you getting this error everytime you are running the form??????
    ==================================================
    This error would come when you are trying to update a record which is currently being used/updated somewhere else.
    By this i mean if you have a screen with emp table and you scroll down to KING's record and then edit his salary, BUT DO NOT COMIT yet. At the same time if someone else has opened this record in some other PC and trying to update the record then you would get this error.
    The Other possible reason could be DB level TRIGGER. Please check the DATABASE level triggers on the base table of the form. Try disabling the trigger and run the form again.
    Hope this helps.
    Please mark the question as answered/helpful if the reply helped you

  • Help !!! couldnot reserve record(2 tries) keep trying

    hi
    i have a problem
    i use windows2000 and form developer 6i and oracle 9i.
    some times in my application i receive this message:
    couldnot reserve record(2 tries) keep trying.
    for example when i open form A in first session
    and and i press f8(execute_query),it runs and there is no problem.
    now if i open same form in second session and press f8 key
    for execute query i receive this message:
    couldnot reserve record(2 tries) keep trying. with [yes] and [no] buttons
    then if i press [no] button for 4 or 5 times
    then i can see my data and this message disappear.
    is there any conflict between oracle 9i and developer6i?
    if you have any solution for this problem,please help me.
    thanks in advance.
    shoja.

    Hai shoja ,
    this is something like DeadLock situvation where 2 sessions trying to get one resource
    u have to kill one session.
    alter system kill session 'sid,seial#'
    u can check the locked object in V$locked_object table ,join it with dba_objects
    to find the object name and v$session to find session details which locked it.
    try it out?
    bye
    Raj.
    email - [email protected]

  • Error - could not reserve record

    This is in oracle forms 10G/win xp
    I am getting this message: Could not reserve record (2 tries). Keep trying?
    The code that causing this error:
    select count(*) into :blk.recordcount from mytable where xid= :blk2.xid;The field is updateable. When I run this query in toad I get the desired number. I am the only who access the table.
    Any idea about this error?

    Hi Wency
    Yes, this could be if u r running 2 instances of this form in the same pc;this happens with me after Executing the Query.
    it's not a condition to update or create only...
    When u got it again u can either do the following:
    1.Click No in response to the message. Do not keep trying to reopen a locked record.
    Pls Note*: your form locks every record it fetches
    2.Wait 1 minute and try to reaccess the record could possibly someone is sharing u same table.
    3.There is 1 way i don't recommand really to get remove from this message is :
    go to Data block property palette > Database Locking Mode > Default Automatic Set it to Delayed. then you can't received this error...
    cause it has a draw back but i leave the choice according to ur form bussiness requirements to decide.
    4.To show if there are any blocking database locks and if so - which user is locking the Database
    use the following queries to get the information you want.
    SELECT * FROM v$LOCK ;
    SELECT * FROM V$LOCKED_OBJECT ;v$session and dba_waiters are two other useful tables u or any one may need...
    Hope this helps...
    Regards,
    Abdetu...
    Edited by: Abdetu on Jan 18, 2011 2:06 AM

Maybe you are looking for

  • ABAP with BAPI'S ?

    Hello Friends, I am basically a J2ee developer and very new to ABAP Programming language, and need to do some BAPI call through ABAP. I am having a following problem, and I am very thankful to some one who can help me out ! The problem is: For exampl

  • Chain-end_chain for a select-option in a subscreen

    hi all, I have a program with a screen 0010 with some fields....one of this fields must have "multiple input" (as with select-options) so I´ve created a subscreen 0020 within this screen 0010 (it´s the only way I know to put select-options in a scree

  • Language-selection-class build problem

    my small program is goting to surpport language switching,e.g. Finnish, English,Chinese. it contains several pages with buttons and text there. in the 1st page we could select the language and then each page will display this language. how should the

  • About Resource Object which get created after careting GTC flat file conn.

    Hi, I have one query: Whenever we create GTC for flat file reconciilation it creates new RO & new Process definition etc. So in this case in OIM there are two ROs one for Proviioning process and another which get created after we create GTC for recon

  • Need help on real life usage of Aggregate functions

    Hi All, I'm preparing for 9i certification 1st paper and I'm now looking at aggregate functions. Could you somebody guide me to any link or source of information about the various various aggregate functions like CORR, COVAR_POP, COVAR_SAMP, DENSE_RA