Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

disabling and enabling a push button on oracle 10g tabular block

b6941faa-b8cd-4496-bf7b-363664e7907dFeb 5 2015 — edited Feb 5 2015

Hi all,

I am not sure if I am writting in the right place.. Actually I have a question regarding oracle 10g forms. I have tried  a number of solution while I was searching in the internet but I couldn't  solve my issue.

I have created a tabular block where I can display my data. In each row I have a button that dispalys LOV according to the specified category by the user. To explain more I have an lov button that have to be enabled and disabled on an each row level depending on the condition I have ..

MY CODE is the following

If :blk.item = 1 then

     set_item_property ('block.item', current_record, enabled, property_true);

else

     set_item_property ('block.item', current_record, enabled, property_false);

end if;

I have tried it in when_new_record_instance, post_query, when_validate_record, post_change  triggers .. it didn't work either it disables all or enables all and I want that on each record level ... I aslo I have tried with set_item_instance_property .

Waiting for your replies

THANKS IN ADVANCE ...

Comments

Suri
Hi,

Maximum size for VARCHAR2 is 4000. So you cant add 32767 characters to a variable which you have defined with VARCHAR2 datatype.

Below will work
DECLARE
  LEN1  NUMBER;
  STR   VARCHAR2(32767);
BEGIN
  
  STR := RPAD('*', 4000, '*');
  
  SELECT LENGTH(STR) INTO LEN1 FROM DUAL;
  DBMS_OUTPUT.PUT_LINE('LEN1: '||LEN1);
 
END;
Thanks,
Suri

Edited by: Suri on Aug 8, 2012 1:50 PM

Edited by: Suri on Aug 8, 2012 1:52 PM
APC
In your first example the database engine overrode your length for the RPAD() call with the SQL limit (4000 characters). In your second example you presented the engine with a 32K string and it hurled. This is because the engine hasn't been programmed to truncate a string which is too long.

If anything I think the first example is inconsistent. Certainly that behaviour is [url http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions147.htm#i78723]not documented.

Cheers, APC
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 5 2015
Added on Feb 5 2015
1 comment
357 views