Home » Developer & Programmer » Forms » Lock the Records (Windows XP Oracle Forms 6i,)
Lock the Records [message #317412] Thu, 01 May 2008 02:20 Go to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
Hi guyz,

I develop one payroll system, i need to lock the record once the payroll issue at the end of the month or as desired date how to lock the records once process?

Regards

Re: Lock the Records [message #317415 is a reply to message #317412] Thu, 01 May 2008 02:29 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure I understood what "locking" means in this context. As I understood it, you'd like to "lock" these records not "now" or "until my PL/SQL procedure has finished", but "from now on". If so - as far as I can tell - you can't permanently restrict access to records using one of available SQL statements; you'll have to do it through the application (for example, setting a table column (let's call it "lock_flag" to "locked" or something like that) and - in subsequent statements - taking care about this flag.

However, if I'm wrong, Oracle offers locking mechanisms; read more about them in the Data Concurrency and Consistency chapter of Oracle Concepts book (this is 10g version; if your database version is different from it, now you know what to search for).
Re: Lock the Records [message #317417 is a reply to message #317412] Thu, 01 May 2008 02:42 Go to previous messageGo to next message
*munnabhai*
Messages: 157
Registered: March 2008
Location: Riyadh
Senior Member
you are rite little i would like to restrict the user from application mode. lets see what will happen i got one idea let you know when i finished...lets c i got the sucess or not....

Thanks for the reply.

Regards
Re: Lock the Records [message #317849 is a reply to message #317412] Sun, 04 May 2008 04:33 Go to previous message
thomasscaria
Messages: 21
Registered: July 2007
Location: Kuwait
Junior Member
check the processing status flag value or date and then set the block property updateable property false.
like
 if flag = true then
    Set_Block_Property(blk_id,INSERT_ALLOWED,PROPERTY_FALSE); 
    Set_Block_Property(blk_id,UPDATE_ALLOWED,PROPERTY_FALSE); 
    Set_Block_Property(blk_id,DELETE_ALLOWED,PROPERTY_FALSE);
 end if;
Previous Topic: Enter Query and Execute Query
Next Topic: How to call "when-button-pressed" trigger from other control's trigger?
Goto Forum:
  


Current Time: Sat Dec 07 04:50:32 CST 2024