How to Lock Form

Dear Members,
How to Lock a Form if two Users are working at the same time on that form.
I need to put a Lock if the form is used by another User and Release the Lock only when the User using it closes the form.
How can we achieve this in Oracle Forms 6i. we are on 11.5.10.2.
Thanks
Sandeep

Using Locking Mode will not stop the issue of one user being told that the record is locked by another. I'm not sure about For Update but one thing it certainly won't do is prevent 2 users inserting the same record, so one user could get an error to say the record already exists, when they commit. Anyway, what happens to the For Update lock when the form is committed?
[Dbms_Lock|http://www.psoug.org/reference/dbms_lock.html] can be used to solve the problem with the following process.
Create a new package variable, control block item or global to store a "lock handle" (varchar2(200)).
When a record is selected in the master block, attempt to release the lock for the stored "lock handle" using dbms_lock.release(lock_handle). Ignore the function's return value (except when developing/debugging!).
Now create a new lock handle using dbms_lock.allocate_unique(lock_name, lock_handle). The lock_name should be a function of the master record's primary key so that it is unique to the record. Store the lock handle in the new variable.
Reuest a lock for the new lock handle, using dbms_lock.request(lock_handle). If the function returns 0 then you have been granted the lock, otherwise you have not.
If you do not have the lock then you need to disable inserts, updates and deletes in the child block. It's nice to set the field backgrounds to grey as well. If you do have the lock then the block should be enabled and the field backgrounds returned to their original colour.
In post-form, release the lock whose handle is stored in the lock_handle variable.

Similar Messages

  • How to lock the month in Planning web forms

    Hi all ,
    we r using the web forms in planning for inputting the data .
    we had a problem here.
    ex:
    User is giving the in put for the month Dec..and again in he is changing the data..so how to lock the in web forms month wise.
    thanks in Adv

    Hi Bunny,
    Do you mean to say that , once the user inputs the values for the month of Dec,after that , you dont want the user to change the values of dec which he had provided.
    Is that what your montly locking means?
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • How to lock the record in the Form

    .How to lock the record
    That is In my customized form if user query the record in one of our Customized form and the system automatically should prevent by quering the same record by other user for the same form .The message to be displayed as locked by another user .
    For example in standard form the same option is available.
    Form Name:GMEBCHED.FMB
    Module:ORACLE PROCESS MANUFACTURING(OPM)
    Could you pls help us how to implement the same for our Customized form .
    Appricaiate your help .
    Regards,
    Radha krishnan

    Hi,
    I tried to put the code under Post-Query trigger. Since user can input the selection criteria in the form. After the form open, after I input the "Update user" ID (this is in the non-base table block), the oracle message prompt: FRM-40653: Record not reserved for update or delete. Try again later..
    So, is there any method to solve it?
    Thanks a lot.
    Regards.

  • How to lock record in a remote database ???

    Hi All!
    How to lock record in a remote table ??? Is it possible to lock by using the RPC ??? What are the options available ??
    thanks
    Sanjeeb Bose
    HCL Infosystems Ltd
    Kolkata India

    DBLinks may be one option...
    --Shirish                                                                                                                                                                                                                       

  • How to set form feed   in output .lst file

    sql >set pagesize 60
    spoo abc
    select * from xyz;
    spoo off
    In the file abc.lst header and placed details 60 lines. but at
    the time of printing if paper lenght is 72 lines how to set form feed?

    Try
    set newpage 0

  • How to lock multiple user for a transcation code at same time is der any tc

    how to lock multiple user for a transcation code at same time is der any tc
    suppose i hav 15 user and i want to lock 10 user for mm02 who can i to it

    Basis can do a export and import transport, still if don't have connection between boxes.
    or
    check this
    http://www.sap-basis-abap.com/abap/copy-program-variants-from-one-to-another.htm

  • How to lock the Printer of LaserJet Pro 500 Color MFP m570dw

    how to lock the Printer of LaserJet Pro 500 Color MFP m570dw

    You can set a control panel lock security level and password for your HP LaserJet series printer. To lock your printer, follow below link:
    http://h20564.www2.hp.com/hpsc/doc/public/display?​docId=emr_na-bpl03612

  • File Lock - How to lock and unlock a file ? Can we do that for an FTP File?

    Hi All,
    I like to retrieve a file from the FTP server using Apache Commons Net libraries.
    for example if the file size is 20MB. When the file is in the progress of copying or transferring from the FTP server i need to lock the local file which is in our local directory so that no other process will use the same local file which is in the process of copying otherwise partially copied files will be used by another process.
    the file should be locked when it was in the progress of copying from the server. I have an automatic process which will access file objects at certain time and try to process the files.
    I like to know the simplest and easiest way to lock and unlock a file object locally which is trying to copy a file from the FTP server which is of huge size.
    And also i like to know how to lock and unlock a file in general?
    Thanks,
    J.Kathir

    we can set it read only only when it complete finishing the writing.
    can we able to make the file as read-only while transferring data to file.
    How to achieve it ? pls give me some sample code

  • How to run form in the background from command line

    please can anybody tell me to
    how to run form in the background from command line
    vishal

    Ummm....Oracle Forms is a foreground runtime kind of thing. What you want is a database procedure (or an OS utility - it depends on what sort of processing you want to do in the background).
    Cheers, APC

  • How to fill forms in adobe reader with lithuanian fonts?

    How to fill forms in adobe reader with lithuanian fonts?
    when i switch on my pc alt+shift to lithuanian language i can only use 2 lithuanian fonts, for other lithuanian fonts i get only blank
    could someone help me to solve this case?

    Adobe Acrobat.  A bit expensive just to change the document background...

  • How to install forms and reports 6i

    I am facing a problem while installing Forms 6i. The following are the details.
    I successfully installed Oracle 9i first under F:\oracle\ora90. While installing Forms 6i, I selected the "Typical" and gave the path as "F:\oracle\ora90" and clicked on the Next Button. Immediately I got an error message as "The location specified, 'F:\oracle\ora90' is already used as an Oracle home for 'Oracle 82 Beta'. It cannot be used as an Oracle home for 'nt'".
    Could any one give the information of how to install forms and reports 6i. It ll be of great help to me.

    use F:\oracle\ora90 as your oracle-db-home
    use F:\oracle\forms6 as your forms-home
    try it
    Gerd

  • How to deploy Forms and Reports from 6i to Web Base

    I am using Forms 6i in client/server mode, I want to upgrade my platform to Forms 10g web base. I know that I have to install Application Server, however, I found that there are so many options in the download page, and, I can only find the WebLogic Server.
    I only need to deploy Forms and Reports, what is the minimum requirements (I means what Oracle software) I have to purchase.
    Can you provide also the download link? any document can teach me how to deploy Forms and Reports? (only Forms and Reports)
    Thanks a lot !!!

    From download page http://www.oracle.com/technology/software/products/ias/htdocs/101202.html you can choose Forms & Reports Services Standalone .
    Documentation at http://download.oracle.com/docs/cd/B19375_07/doc/frs/docs.htm

  • I'm trying to loack a document with mac os x 10.6.8  They only have infor. on how to lock it with lion 7.0 on the help button.  Can I lock it with snow leopard?

    I'm trying to lock a document with mac os x 10.6.8  I only found infor. on how to lock a document with os x lion 7.0 on the help button.  Can I lock it with 10.6.8 operating system?

    Thank you.  I did what you suggested and it worked. 

  • How to lock a drive and/or folder if there is no lock icon in the get info field?, how to lock a drive and/or folder if there is no lock icon in the get info field?

    how to lock a drive and/or folder if there is no lock icon in the get info field?, how to lock a drive and/or folder if there is no lock icon in the get info field?

    You can create an encrypted disk image.
    http://www.macworld.com/article/1154559/password_protect_folders.html

  • How to make like Encarta encyclopedia and basic screen settings and how to lock the documents in the entire data.

    dear guys how can i make like a off line Encarta encyclopedia and basic screen settings and how to lock the documents in the entire data in visual studio.                 
       thank you. 
                                                              Million
    Getu

    Dave,
    I will +1 Pixelan's products. They are great, simple, and have about the best support that I know of. When you explore, say Pixelan's SpiceMaster, dig deeply. Things appear rather mundane, on the surface, but there is so very much power lurking, just below the surface. I could almost imagine a 1000 page manual to cover every possible aspect of that program... Every time that I use it, I learn something new, and wonderful.
    Good luck,
    Hunt

Maybe you are looking for

  • Opening exec files on mac

    I would like to open exec files on my mac rather than in windows. I heard that it is possible using some 3rd party programs. Can anyone help me with this one. Thanks Kevin

  • Picture wont fit the screen

    All, i am using my macbook pro on my tv it a 32 in. sony LCD and i cant get the picture to fit right, with overscan it cuts off some of the screen (the whole menu bar) and with overscan off i have a smaller screen on the tv (black around all sides).

  • Business Document Navigator -- Show only specific document types

    Hello to all, I'm using the business document navigator. With parameter excluding of method cl_bds_document_set=>call_navigator you can disable the standard document types are shown by passing the value NO_STANDARD_DOCS. Is it possible to define docu

  • Gif icons no longer transparent?

    I have dozens of icons on my desktop, the images are white-ish shapes with transparent backgrounds. After upgrading to Leopard, all of the transparent parts of the icons have turned white. So now I have just a bunch of white squares. Not very useful

  • How do I open CS4 files after Upgrading to Cloud? The older files are showing up gray and won't open

    How do I open CS4 files after Upgrading to Cloud? The older files are showing up gray and won't open.