Skip to Main Content

APEX

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!

Ajax Call Back returned String limitation

FofanaSep 26 2019 — edited Oct 11 2019

Hello All,

I am using Ajax Call to return the content of a select list. Now I have an error once string length is over 32765 sqlerrm:ORA-06502: PL/SQL: numeric or value error

I have declared the return variable as CLOB but yet have issue.

The context is this:

I want to disable some elements in the select list based on some condition to prevent user from selecting them but he should see them at least.

So I came up with something like this:

In the AJAX Call Back code I build myself the <option>...</option> html of the select list, in order to disable the desired entries

loop
v_query := v_query||'<option value="'||rec.r||'"'||(case when nvl(rec.r,'-1') = nvl(:P1_ITEM,'-1') then ' selected="selected" ' else null end)
                          ||(case when rec.exist = 1 then '" disabled="disabled" style="color:red;">'
                                                     else '">'
                                                     end)||rec.d||'</option>';
end loop;

htp.prn(v_query);

Then in my apex.server.process I do :

$('#P1_ITEM').html(pData);

Is there a way to avoid the string limitation?

Or is there another way to do that without AJAX Call? (edited)

Thanks

This post has been answered by Scott Wesley on Oct 1 2019
Jump to Answer
Comments
Post Details
Added on Sep 26 2019
9 comments
704 views