Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    Hanoi- Vietnam
    Posts
    27

    Wink Unanswered: Locking record ? help me, please!

    Hello Expert !

    I 'm developting a Project using Oracle9i Form. Now I have a ploblem that I ca'nt solve. That is:
    - When I go to a record in Form and change data. But if this record is locking by other transaction I alway get a alert look like "Could not reserve 2 tries. Keep trying ?".

    Can you show me the sollution to hide this alert or I can replace this message by Vietnamese ?.

    I really need the sollution for this Ploblem. Help me, please !

    Thank you very much.

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi,

    I can give you the PL/SQL to check and lock a row - you'll have to work out how to integrate it into your forms code...

    PHP Code:
    function CheckAndLockinID in tablename.pk%type is
       tempID tablename
    .pk%type;
    begin
       select pk
       into tempID 
       from tablename
       where pk 
    inID
       
    for update nowait;
       return (
    1);   -- locked successfully
    exception when others
       
    -- Already locked or some other error
       
    return (0);
    end CheckAndLock
    Hth
    Bill

  3. #3
    Join Date
    Sep 2003
    Location
    Hanoi- Vietnam
    Posts
    27
    Great !

    I have solved using your function.

    Thank !

Posting Permissions

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