Home » Developer & Programmer » Forms » Syntax to set the property of a block
Syntax to set the property of a block [message #332061] Mon, 07 July 2008 07:00 Go to next message
mithu
Messages: 11
Registered: July 2008
Junior Member
hi
please tell me the
synatax to set the insert allowed ,update allowd property of a block to false

Thanx
Re: Syntax to set the property of a block [message #332087 is a reply to message #332061] Mon, 07 July 2008 08:41 Go to previous messageGo to next message
dude4084
Messages: 222
Registered: March 2005
Location: Mux
Senior Member
Remember, Help present in Form developer is very good.

Here is example, related to your problem, present in that help.

Quote:
/*

** Built-in: SET_BLOCK_PROPERTY
** Example: Prevent future inserts, updates, and deletes to
** queried records in the block whose name is
** passed as an argument to this procedure.
*/
PROCEDURE Make_Block_Query_Only( blk_name IN VARCHAR2 )
IS
blk_id Block;
BEGIN
/* Lookup the block's internal ID */
blk_id := Find_Block(blk_name);
/*
** If the block exists (ie the ID is Not NULL) then set
** the three properties for this block. Otherwise signal
** an error.
*/
IF NOT Id_Null(blk_id) 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);
ELSE
Message('Block '||blk_name||' does not exist.');
RAISE Form_Trigger_Failure;
END IF;
END;


-Dude

[Updated on: Mon, 07 July 2008 08:43]

Report message to a moderator

Re: Syntax to set the property of a block [message #332867 is a reply to message #332087] Thu, 10 July 2008 00:19 Go to previous message
mithu
Messages: 11
Registered: July 2008
Junior Member
Thanx a lot.. it solved my problem
Previous Topic: Auto populating a text box
Next Topic: Expandable / Collapsible Menu
Goto Forum:
  


Current Time: Fri Sep 27 14:23:47 CDT 2024