Apex Shuttle - ORA-06502

Hi people,

I'm using the shuttle of the Apex, but returned the error ' ORA-06502: PL/SQL: digital error or value: character string buffer too small ", when the query returns many rows then 800.»» Where can I change this?
I enclose the procedure.

Thanks for the help.

create or replace PROCEDURE DHTML_SHUTTLE)
pSQL_1 clob,
pSQL_2 clob,
pID_1 varchar2 default '1',
pID_2 varchar2 default '2'.
pSort1 varchar2 default 'Y ',.
pSort2 varchar2 default 'Y ',.
pFixed1 varchar2 default 'n'.

pHeight varchar2 default '150'.
pWidth varchar2 default '150'.
pImagePrefix varchar2 default v ('IMAGE_PREFIX'),
pOnClick varchar2 default null,
pStyle varchar2 default null,
pFirstImage varchar2 default 'shuttle_top.png '.
pPreviousImage varchar2 default 'shuttle_up.png '.
pNextImage varchar2 default 'shuttle_down.png '.
pLastImage varchar2 default 'shuttle_bottom.png '.
pRefreshImage varchar2 default 'shuttle_reload.png '.
pRightAllImage varchar2 default 'shuttle_last.png '.
pRightImage varchar2 default 'shuttle_right.png '.
pLeftImage varchar2 default 'shuttle_left.png '.
pLeftAllImage varchar2 default 'shuttle_first.png '.

) as
l_shuttle_attributes varchar2 (20000);
Start
l_shuttle_attributes: = ' multiple = "multiple" style = "height :'|| pHeight | "PX; width :'|| pWidth | "PX; » " ;
HTP. PRN ("< style >");
If (pStyle is null) then
/ * style for default shuttles.
HTP. PRN ('.shuttleSort1 img, .shuttleControl img, .shuttleSort2 img {display: block; cursor: hand; cursor: margin: 3px ;}");})
on the other
HTP. PRN (pStyle);
end if;
HTP. PRN ("</style > '");
HTP. PRN ("< table cellpadding ="0"cellspacing ="0"border ="0 "summary =" "> < tr >" ");
/ * Sort orders 1 * /.
if(pSort1='Y') then
HTP. PRN ("< class td ="shuttleSort1"> ');
HTP. PRN ("< img src =" "'| pImagePrefix | pFirstImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ;'|| ("T") pOnClick | ("' alt = 'Top' / >");
HTP. PRN ("< img src =" "'| pImagePrefix | pPreviousImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ;'|| ("U") pOnClick | ("' alt = 'Up' / >");
HTP. PRN ("< img src =" "'| pImagePrefix | pNextImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ;'|| ("D") pOnClick | ("" alt = "Low" / > ");
HTP. PRN ("< img src =" "'| pImagePrefix | pLastImage |'") onclick = "g_ShuttleMe" | pID_1 | '.sort1 ('B') ;'|| pOnClick | ("' alt = 'Bottom' / >");
HTP. PRN ("< table > '");
end if;
/ * Shuttle point 1 * /.
HTP. PRN ("< class td"shuttleSelect1"= > ' |") htmldb_item.select_list_from_query (pID_1, null, pSQL_1, l_shuttle_attributes, 'NO', null, null, 'SHUTTLE_': pID_1, 'SHUTTLE_': pID_1, null). "< table >');
/ * Shuttle controls * /.
HTP. PRN ("< td align ="center "class =" shuttleControl "> ');
HTP. PRN ("< img src =" "'| pImagePrefix | pRefreshImage |'") onclick = "g_ShuttleMe" | pID_1 | '. reset(); | pOnClick | ("" alt = "reset" / > ");
if(pFixed1='Y') then
HTP. PRN ("< img src ="'| pImagePrefix | pRightAllImage |') "onclick =" move_all ('| "')" SHUTTLE_' | pID_1 | " «, » ||'' 'SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" > > "/ >"); "
HTP. PRN ("< img src ="'| pImagePrefix | pRightImage |) "" onclick = "move ('|) "' SHUTTLE_' | pID_1 | " «, » ||'' 'SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" > "/ >"); "
HTP. PRN ("< img src ="'| pImagePrefix | pLeftImage |) "" onclick = "delete ('|) "' SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" < "/ >"); "
HTP. PRN ("< img src ="'| pImagePrefix | pLeftAllImage |) "" onclick = "remove_all ('|) "' SHUTTLE_' | pID_2 | " ')  ;'|| pOnClick | "" "alt =" < < "/ >"); "
on the other
HTP. PRN ("< img src =" "'| pImagePrefix | pRightAllImage |'") onclick = "g_ShuttleMe" | pID_1 | '. move_all() '. pOnClick | "" "alt =" > > "/ >"); "
HTP. PRN ("< img src ="'| pImagePrefix | pRightImage |) "" onclick = "g_ShuttleMe" | " pID_1 | '. move(); | pOnClick | "" "alt =" > "/ >"); "
HTP. PRN ("< img src ="'| pImagePrefix | pLeftImage |) "" onclick = "g_ShuttleMe" | " pID_1 | '. remove() '. pOnClick | "" "alt =" < "/ >"); "
HTP. PRN ("< img src ="'| pImagePrefix | pLeftAllImage |) "" onclick = "g_ShuttleMe" | " pID_1 | '. remove_all() ". pOnClick | "" "alt =" < < "/ >"); "
end if;
HTP. PRN ("< table > '");
/ * Shuttle point 2 * /.
HTP. PRN ("< class td"shuttleSelect1"= > ' |") htmldb_item.select_list_from_query (pID_2, null, pSQL_2, l_shuttle_attributes, 'NO', null, null, 'SHUTTLE_': pID_2, 'SHUTTLE_': pID_2, null). "< table >');
/ * Sort controls 2 * /.
if(pSort2='Y') then
HTP. PRN ("< class td ="shuttleSort2"> ');
HTP. PRN ("< img src =" "|") pImagePrefix | pFirstImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ;'|| ("T") pOnClick | ("' alt = 'Top' / >");
HTP. PRN ("< img src =" "|") pImagePrefix | pPreviousImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ;'|| ("U") pOnClick | ("' alt = 'Up' / >");
HTP. PRN ("< img src =" "|") pImagePrefix | pNextImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ;'|| ("D") pOnClick | "" alt = "to the low"(/>'); "
HTP. PRN ("< img src =" "|") pImagePrefix | pLastImage |' "onclick ="g_ShuttleMe"| pID_1 | '.sort2 ('B') ;'|| pOnClick | ("' alt = 'Bottom' / >");
HTP. PRN ("< table > '");
end if;
HTP. PRN ("< /tr > < / table > '");

HTP. PRN ("< script > '");
HTP. PRN ('if(!flowSelectArray) {var flowSelectArray = new Array();}' | chr('13') | chr('10'));
HTP. PRN ("var g_ShuttleMe' |") pID_1 | "= null". Chr('13') | Chr('10'));
HTP. PRN ("flowSelectArray [' |]") pID_1 | «] = "SHUTTLE_" | "» pID_1 | '";' || Chr('13') | Chr('10'));
HTP. PRN ("flowSelectArray [' |]") pID_2 | «] = "SHUTTLE_" | "» pID_2 | '";' || Chr('13') | Chr('10'));
HTP. PRN ('g_ShuttleMe' | pID_1 |) ' = new dhtml_ShuttleObject ("SHUTTLE_" | pID_1 |) "", "SHUTTLE_" | " pID_2 | '");' || Chr('13') | Chr('10'));
HTP. PRN ("< /script >" | ") chr('13') | chr('10'));
end;

The problem that you hit is htmldb_item.select_list_from_query, so tweak that a bit.
DG tournament, I used my own Shuttle, but never documented it as well, but I found an another blog post that makes.
Take a look at this solution.

Just a question; do you really want more than 800 objects in your Shuttle? Is it not more logical to have a drop down menu or something like that before limiting the list?

Dimitri

Tags: Database

Similar Questions

  • APEX 5.0. With the image stored in a BLOB gives ORA-06502.

    Hello

    I want to create an interactive report - computer desk with an image that is stored in a BLOB but it a: returnes ORA-06502: PL/SQL: digital or value error: character of number conversion error.

    I created a test with only the image report (charged - which is a BLOB) and an ID (PK - one number from a sequence)

    SELECT ID, invoice of foto

    I tried with and without a formatmask for the ' 999999999999999 ID' and the Type of plain text, because it seems not to be a better choice...

    For the Type 'pay' is 'View Image' and the 'Table name' and 'BLOB column' are defined. 'Primary Key column 1' set ID 'column of Type mime"points to a field that contains" image/jpeg", as the stored image is a photo in format jpg.

    The image from a Forms application displays OK.

    DB is a 11.2.0.4 on Linux 6.6 and APEX is 5.0

    What did I miss?

    Thank you

    Dino

    Dino Hustinx wrote:

    I want to create an interactive report - computer desk with an image that is stored in a BLOB but it a: returnes ORA-06502: PL/SQL: digital or value error: character of number conversion error.

    I created a test with only the image report (charged - which is a BLOB) and an ID (PK - one number from a sequence)

    SELECT ID, invoice of foto

    As described in the documentation, the report query selects the length of the BLOB, not the column itself column:

    select id, dbms_lob.get_length(billed) billed from foto
    
  • Process apex Pl/SQL error: ORA-06502: PL/SQL: digital error or value: specified incorrect LOB Locator

    Apex 4.2

    I searched through the forums of the research about this error, but I do not understand what to do from here. I am writing a process that sends an e-mail when a value of the claim is made (or on a button click). Procedure is as follows:

    DECLARE
       l_body        clob;
       l_body_html   clob;
       l_subject    varchar2(100);
    
    BEGIN
      
    l_body := empty_clob();
    l_body_html := empty_clob();
    
    
    IF V('REQUEST') in ('SAVE_ME') AND :P32_PARENT_UPDATED_FL IS NOT NULL THEN
       l_subject :=  'Survey Job Request Updated'||utl_tcp.crlf||utl_tcp.crlf;
       l_body := 'Update'||utl_tcp.crlf;
    
       l_body_html := '<html>
          <head>
             <style type = "text/css">
                 /* Can add style attributes later */
             </style>
          </head>
          <body>'||utl_tcp.crlf;
       l_body_html := l_body_html ||'Survey Job Request has been updated.<br /><br />'||utl_tcp.crlf;
       l_body_html := l_body_html ||'Title: '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_TITLE||utl_tcp.crlf;
       l_body_html := l_body_html ||'<br />Request Category : '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_REQUEST_CATEGORY||utl_tcp.crlf;
       l_body_html := l_body_html ||'<br />Update Date: '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_UPDATE_DATE||utl_tcp.crlf;
       l_body_html := l_body_html ||'<br />Updated By: '||utl_tcp.crlf;
       l_body_html := l_body_html ||:P32_LAST_EDITED_BY_USERID||utl_tcp.crlf;
       l_body_html := l_body_html ||'</body></html>';
    
    
    
    
    
    END IF;
    
    :P32_CANCELLATION_REASON := l_body_html;
    
    apex_mail.send(
       p_to             =>  '[email protected]',
       p_from           =>  '[email protected]',
       p_body           =>  l_body_html,
       p_body_html      =>  l_body_html,
       p_subj           =>  l_subject);
    
    END;
    
    
    
    
    
    
    
    
    
    

    I added two lines to the code (lines 08 and 09) and when I run my program, I now get the error:

    • ORA-21560: 3 argument is null, invalid or out of range

    Without these two lines, I received the error:

    ORA-06502: PL/SQL: digital error or value: specified incorrect LOB Locator

    I'm not quite sure what is wrong or what I can change. There seems to be right, and in fact, it worked before. I have no idea why this error keeps popping up. Any help on that would be great. Thanks in advance.

    Hello

    NewApexCoder wrote:

    Hmmm... good point. I think that apex_mail.send must be called inside the IF block. But in the future, I added several conditional statements, won't I need to include the apex_mail.send function in each IF block? But at the same time, there is the case that if no conditional instructions are met? Tests, when none of the conditions are true (when I had a second IF block in the code), an email would not be defined, which is correct. Could that be causing a problem however. If the IF block is not filled could he always try to send an email about anything or the l_body_html and l_subject fields have in them the garbage that causing ORA error?

    If the call to the procedure of sending (it is a procedure, and not a function) many times is necessary or useful depends on exactly what you're trying to do.

    For example, you can write to Santa for

    • Submit a wish list
    • Change of address
    • Contradiction with your boss, who can you tell Santa you were mean

    or any combination of these grounds.  If you want to send a simple email whenever any of the conditions are met (and not send a when none are met), then you could do something like this:

    DECLARE

    need_to_send BOOLEAN: = FALSE;

    ...

    BEGIN

    ...

    IF wish_list IS NOT NULL

    THEN

    l_body: = l_body | ...

    need_to_send: = TRUE;

    END IF;

    IF old_addresss <> new_address

    THEN

    l_body: = l_body | ...

    need_to_send: = TRUE;

    END IF;

    IF boss_is_a_big_fat_liar

    THEN

    l_body: = l_body | ...

    need_to_send: = TRUE;

    END IF;

    IF need_to_send

    SO - It's the only call to send

    apex_mail. Send...

    In any case, the error message ' ORA-21560: argument 3 sucks...» "is pretty clear: If you have not given a value to everything you're passing as p_body, then you'd better call the procedure.

  • Generation XML problem in APEX ORA-06502

    Hi, I have a problem with the generation of XML, I developed an application in the APEX, and in an html page, I have this process: +.

    declare
    l_XML varchar2 (32767).
    Start
    .......
    Select xmlElement
    (
    "iva"
    xmlElement ("numeroRuc", J.RUC),
    xmlElement ("razonSocial", J.RAZON_SOCIAL),
    xmlElement ("idRepre", J.ID_REPRE),
    xmlElement ("rucContador", J.RUC_CONTADOR),
    xmlElement ("anio", J.ANIO),
    xmlElement ("my", J.MES),

    xmlElement
    (
    "shopping."
    (
    Select xmlAgg
    (
    xmlElement
    (
    "detalleCompra,"
    -xmlAttributes (K.ID_COMPRA like "COMPRA"),
    xmlForest
    (
    K.COD_SUSTENTO as "codSustento."
    K.TPLD_PROV as "tpldProv."
    K.ID_PROV as "idProv."
    K.TIPO_COMPROBANTE as "tipoComprobante."
    TO_CHAR (K.FECHA_REGISTRO, ' DD/MM/YYYY "") as "fechaRegistro."
    K.ESTABLECIMIENTO as "food."
    K.PUNTO_EMISION as "puntoEmision."
    K.SECUENCIAL as "secuencial".
    TO_CHAR (K.FECHA_EMISION, ' DD/MM/YYYY "") as "fechaEmision."
    K.AUTORIZACION as 'autorizacion. "
    TO_CHAR (K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva."
    TO_CHAR (K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible."
    TO_CHAR (K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav."
    TO_CHAR (K.MONTO_ICE, 9999999999.99) as "montoIce."
    TO_CHAR (K.MONTO_IVA, 9999999999.99) as "montoIva."
    TO_CHAR (K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes."
    TO_CHAR (K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios."
    TO_CHAR (K.VALOR_RET_SERV_100, 9999999999.99) as 'valorRetServ100 '.
    ),
    xmlElement
    (
    'air ',.
    (
    Select xmlAgg
    (
    xmlElement
    (
    "detalleAir,"
    xmlForest
    (
    P.COD_RET_AIR as "codRetAir."
    TO_CHAR (P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir."
    TO_CHAR (P.PORCENTAJE_AIR, 999.99) as "porcentajeAir."
    TO_CHAR (P.VAL_RET_AIR, 9999999999.99) as 'valRetAir '.
    )
    )
    )
    ANEXO_COMPRAS p
    where P.ID_COMPRA = K.ID_COMPRA
    AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
    )
    ),
    xmlElement ("estabRetencion1", K.ESTAB_RETENCION_1),
    xmlElement ("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
    xmlElement ("secRetencion1", K.SEC_RETENCION_1),
    xmlElement ("autRetencion1", K.AUT_RETENCION_1),
    xmlElement ("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY'));
    xmlElement ("docModificado", K.DOC_MODIFICADO),
    xmlElement ("estabModificado", K.ESTAB_MODIFICADO),
    xmlElement ("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
    xmlElement ("secModificado", K.SEC_MODIFICADO),
    xmlElement ("autModificado", K.AUT_MODIFICADO)
    )
    )
    SRI_COMPRAS k
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    AND K.ID BETWEEN 1 AND 25
    )
    )
    ). getClobVal()
    in l_XML
    ANEXO_INFORMANTE j
    where J.ID_INFORMANTE =: P3_MES
    and J.RUC =: P3_ID_RUC
    and J.ANIO =: P3_ANIO
    and J.MES =: P3_MES;

    -HTML
    sys.owa_util.mime_header('Text/XML',false);
    sys. HTP.p ("Content-Length: ' |") length (l_XML));
    sys.owa_util.http_header_close;
    sys. HTP. Print (l_XML);
    end;



    Now my table contains over 900 lines and only when I specifically chose 25 rows of the table "ANEXO_COMPRAS" in the case (AND K.ID BETWEEN 1 AND 25) the generated XML.

    I think the problem may be with the data type that is declared 'varchar2', but I tried with "CLOB" data type, and the error is the same. +

    declare
    l_XML CLOB.
    Start
    -View XML
    sys. HTP.init;
    wwv_flow.g_page_text_generated: = true;
    wwv_flow.g_unrecoverable_error: = true;

    -Select XML
    Select xmlElement
    ( .......

    )
    SRI_COMPRAS k
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    .........
    ). getClobVal()
    in l_XML
    ANEXO_INFORMANTE j
    where J.ID_INFORMANTE =: P3_MES
    and J.RUC =: P3_ID_RUC
    and J.ANIO =: P3_ANIO
    and J.MES =: P3_MES;

    -HTML
    sys.owa_util.mime_header('Text/XML',false);
    sys. HTP.p ("Content-Length: ' |") length (l_XML));
    sys.owa_util.http_header_close;
    sys. HTP. Print (l_XML);
    end;

    The error generated is ORA-06502: PL/SQL: digital error or value+ _

    Please I need your help. I don't know how to solve this problem, how to use the 'CLOB' data type to the XML file can be generating+.

    Published by: JohannaCevallos07 on 26-sep-2012 10:52

    In the DECLARE section:

    l_xml       clob;
    chunk_size  pls_integer := 32767;
    

    then replace

    htp.print(l_XML);
    

    with the loop:

    for i in 0..trunc((dbms_lob.getlength(l_xml) - 1) / chunk_size)
    loop
      htp.prn( dbms_lob.substr(l_xml, chunk_size, 1 + i*chunk_size) );
    end loop;
    
  • Error in the generator of the ApEx 4 on Edit Page of the article: ORA-06502

    Hello

    We took 4 ApEx (patch 4.0.1.00.03), and have a problem in a single application, where appears the error ORA-06502 character string buffer too small.) This error at bottom of the page this article Page. In addition, point editing the page "settings" section is left blank, so I can't change any settings. It also gives me wrong when creating new items, so I have to copy existing elements and change them from place. This worked until recently, when the mistake is now also displayed in the application itself, and not only in the constructor. This is a page with a tabular presentation and some elements of search filter. After having fill the filter and click on a search button, the error message and tables is not rendered. This happens from time to time, and the 'solution' is to disconnect and return to the application. I'm not 100% sure, but I guess that's the same problem as the error appearing in the report generator. It is certainly not caused by user data.

    So far, I found this:

    While developing the application, we regularly put the generator of the ApEx between French and English. I read that it was a cause of ORA-06502, but that this problem has been resolved in version 4.0.1.00.03. Our problem may still be linked to the multilingual constructor?

    I ask this because we are running other applications in the same environment, ApEx, and they are all very good. So somehow this error in Report Designer is related to this particular application.

    Any ideas?

    Thanks in advance!

    Hello

    (1) no longer this error occurs if you export your application and install it on apex.oracle.com which has 4.0.2?
    (2) do you use point type plug-ins in your application. In 4.0.1 there was a mistake in the generator if too many when installed in this application. Reduce the number of plug-ins type point or better to install 4.0.2.00.07

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Validation of the APEX: ORA-06502: PL/SQL: digital error or value:

    Hello

    I need help for validation. The user set to ' field minutes'(besoin d'un nombre compris entre 0 et 59).

    My solution is to do two commits:

    1 - no number:
    Name: P1_MINUTES
    Type: Regular Expression
    Validation expression 1: P1_MINUTES
    ({Validation expression 2: ^ \d{1,5}(\.\d{1,2})? $

    2. more high level then 59:
    Name: P1_MINUTES
    Type: Function return Boolean
    1 validation expression:
    If: P10_TOT_MINUTEN < 60 then
    Returns true;
    on the other
    Returns false;
    end if;
    Validation expression 2: -.

    2 validation gives this error (for example a = m value):
    ORA-06502: PL/SQL: digital or value error: character number conversion error - the reason is clear m value is not numeric

    How this problem can be solved!

    Condition 2 validation by using a condition of PL/SQL Expression:

    regexp_like(:p1_minutes, '^\d{1,5}(\.\d{1,2})?$')
    
  • apex_json throws ORA-06502

    Hello

    I use 5 APEX and must work with GEOJSON.

    If I test the following statement in SQL Developer, everything works fine:

    DECLARE
        s varchar2(32767) := '{ "a": 1, "b": ["hello", "world"]}';
    BEGIN
        apex_json.parse(s);
        sys.dbms_output.put_line('a is '||apex_json.get_varchar2(p_path => 'a'));
    END;
    

    But if I change the JSON data to the following:

    s varchar2(32767) := '{ "a": 1.1, "b": ["hello", "world"]}';
    

    I get this error:

    Fehler beim Start in Zeile : 1 in Befehl -
    DECLARE
        s varchar2(32767) := '{ "a": 1.1, "b": ["hello", "world"]}';
    BEGIN
        apex_json.parse(s);
        sys.dbms_output.put_line('a is '||apex_json.get_varchar2(p_path => 'a'));
    END;
    Fehlerbericht -
    ORA-06502: PL/SQL: numerischer oder Wertefehler: Fehler beim Konvertieren von Zeichen zu Zahl
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 367
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 519
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 566
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 756
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 774
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 811
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 839
    ORA-06512: in "APEX_050000.WWV_FLOW_JSON", Zeile 852
    ORA-06512: in Zeile 4
    06502. 00000 -  "PL/SQL: numeric or value error%s"
    *Cause:    
    *Action:
    

    The same thing happens with with MyMethod...

    sys.dbms_output.put_line('a is '||apex_json.get_number(p_path => 'a'));
    

    Because I work with GEOJSON, there are decimal numbers in my JSON data - I have to deal with.

    I have not found any suspicion in the apex_json documentation.

    How can I solve this problem?

    Kind regards

    Christian

    Hello

    your example works fine for me on 5.0.2. There were a few bugs that fixed us since 5.0. Some may be available as SAFF, but maybe you need to upgrade to the latest version.

    Kind regards

    Christian

  • ORA-06502 error digital or value of PL/SQL.

    Hi experts,

    Oracle Apex 4.2, 11g database, using windows 7.

    I created a form and trying to create automatically generated # (sequence of not) with logic and SQL.

    My requirement is to generate the good good exercise only and exercise begin from 01 July and ends 30 June each year. This means if the 07/01/2015 start it will create a new voucher No.

    The table name is GL_PV and the columns are:

    Number of PV_No

    Date of PV_Date

    Number of CC_code

    number amount

    Remarks varchar2 (100)

    What I did: -.

    Created a process to submit before the calculations and validations.

    Code are

    IF TO_NUMBER (TO_CHAR (: P15_pv_date, 'MM')) < = 6 THEN

    SELECT MAX (to_number (nvl(pv_no,0))) + 1

    IN: P15_pv_no

    OF GL_PV

    WHERE pv_date

    BETWEEN

    TO_DATE ('01 - JUL' |) ' -'|| (TO_NUMBER (TO_CHAR(:P15_pv_date,'YYYY'))-1), 'DD-MON-YY')

    AND

    TO_DATE (30 - JUN'|) ' -'|| To_char(:P15_pv_date,'YYYY'), 'DD-mon-YY')

    and cc_code =: P15_cc_code;

    ON THE OTHER

    SELECT MAX (to_number (nvl(pv_no,0))) + 1

    IN: P15_pv_no

    OF GL_PV

    WHERE pv_date

    BETWEEN

    TO_DATE ('01 - JUL' |) ' -'|| To_char(:P15_pv_date,'YYYY'), 'DD-mon-YY')

    AND

    TO_DATE (30 - JUN'|) ' -'|| (TO_NUMBER (TO_CHAR(:P15_pv_date,'YYYY')) + 1), 'DD-MON-YY')

    and cc_code =: P15_cc_code;

    END IF;

    If: P15_pv_no is null then

    : P15_pv_no: = 1;

    end if;

    and press the button when Conditions = Generate_Button

    I have the default assign to pv_date = sysdate, when I launched the point Pv_date form shows the current date and I click on Generate_button now show error.

    Error ORA-06502 PL/SQL digital or value. Conversation number character.

    One last thing, I checked this code already in TOAD, type I assigned as DATE-value = 10/11/2014 (today's date) works fine without error.

    Please guide what this evil is stated.

    Best regards

    : P15_pv_date is probably not a date but a varchar2 in Apex

    Try this

    NVL SELECT (MAX (to_number (nvl(pv_no,0))) + 1, 1)

    IN: P15_pv_no

    OF GL_PV

    WHERE pv_date

    BETWEEN to_date (' 01-07-' |) (extract (year of to_date (: P15_pv_date, "dd-mm-yyyy")) + case when extracted (months to_date (: P15_pv_date, "dd-mm-yyyy")))<= 6="" then="" -1="" else="" 0="" end="" ),="" 'dd-mm-yyyy'="">

    AND to_date (30 - 06-' |) (extract (year of to_date (: P15_pv_date, "dd-mm-yyyy")) + case when extracted (months to_date (: P15_pv_date, "dd-mm-yyyy")))<= 6="" then="" 0="" else="" 1="" end="" ),="" 'dd-mm-yyyy'="">

    and cc_code =: P15_cc_code;

  • ORA-06502: PL/SQL: digital error: error in the conversion of char to number

    Hello world.

    I have a strange problem here. I'll try to explain better. I work with APEX 4.2 and of Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production.

    Here are my parameters NLS_SESSION_PARAMETER and NLS_DATABASE_PARAMETER: NLS_NUMERIC_CHARACTERS,.


    I have a table with a lot of body numbers, and when I imported a MS Access application data, all fields were imported with the comma as decimal separator.


    Now, I have a form with several fields of number and when I leave a numeric field, a body of numbers of amount total is calculated and automatically filled with a bit of javascript.


    Now the problem: calculating fields (sum) succeeds only when I use the decimal as the delimiter. If I use the comma, I get a NaN value in the total amount field. I managed to convert all commas in points with javascript, so the total amount is calculated.

    When I try to save the record, I get the error: ORA-06502: PL/SQL: digital error: error in the conversion of char to number because I'm trying to save the separator point in my number fields.


    I tried to use REPLACE function to replace the. by one, before winning but does not solve the problem.


    This sounds familiar to anyone?


    Thanks in advance.



    OK, the problem is solved people.

    Somehow, the registration procedure had an influence on another calculation of my form and the error came from this process. So I put a to_number and replace stated in the calculation and all records very well and it shows my total.

  • Text editor enriched ORA-06502: PL/SQL: digital or value error: character string buffer too small

    Hello

    I have apex user 4.2.3 with enterprise database edition 11, I page include RICH TEXT EDITOR, when I add data to this text and save it will record successfully and when I try to view this information in another page I see all the data, as expected, the problem when I try to go to the same page as RICH TEXT EDITOR error message apper ORA-06502 : PL/SQL: digital or value error: buffer string too small, I see this link https://forums.oracle.com/thread/2461151?tstart=0 but I don't know how it solve it, the problem is made data at the point of the rich text editor.


    Any suggestion?


    Thank you

    Thanks for the reply,

    Its standard form with text rich field, my question she same as link above I added before

  • Error processing request. ORA-06502: PL/SQL: digital error or value OK

    Hello

    I want to open a session in an APEX application using the IE 8 browser, but I can't because this error:

    https://naa-vm02.us.oracle.com:7510/i/error.gifErrorError processing request.
    ORA-06502: PL/SQL: digital error or value
    Ok

    I can run this app with Chrome or Mozilla, but I need to open it with IE.

    Can you please tell me how should I solve this problem?

    Thank you

    It is a problem with your version of APEX that you use... There was a patch released about 6 months ago... or you can just upgrade to the latest version. I also had this problem, and there are several similar topics in this forum about the exact problem and at least the a precise details on the patch/fix.

  • Ideas for work around ORA-06502: character string buffer too small on the interactive report

    Hello

    It comes to Apex 4.2.  We try to create an interactive report.  The report is for something similar at a follow-up time.  We try to concat a comments column as the sum of the hours.  For example,.

    Select TASK_NAME, sum (HOURS), to_char (XMLAGG (XMLELEMENT(E,E.COMMENTS ||) ' : ')). Extract ('//Text ()'). GETSTRINGVAL()) USER_COMMENTS of...

    This query works fine if we seek only to a window of 1 week.  The question that we live, when we expand the scope of the query to include data from 3 months, we hit ORA-06502 interactive report.  If we remove this column from the interactive report, then the report works very well.

    Anyone has any ideas on how we might be able to work around this problem?  I'm guessing we're reached the limit of 32 k on the report.  Ideally, we would show just the last X number of comments and then have a link to show all comments

    Any help would be appreciated

    Thank you

    Mike

    ListAGG raises an ORA-01489 for varchar2 > 4000 bytes

    OP has an ORA - 06502--> IR is running within a limit of 4 k / 32 k.

    quick fix: wrap USER_COMMENTS ListAGG in a substr (..., 1, 4000)

    Longer solution, use a subquery to modify comments based on ROW_NUMBER() (IE after the nth line, change the null)

    with
    -- simulating data
    t as (select task_id, sysdate - lv as date_entered
      ,round(dbms_random.value(1,24)) hours
      , '-*' || lv || '.' || task_id || '*-' as user_comments
    from ( select level as task_id from dual connect by level <=10 ), (select level lv from dual connect by level < 1000)
    ),
    -- modify data
    modified_data as (
      select task_id, hours, date_entered
        ,case
          when row_number() over (partition by task_id order by date_entered desc) < 5
            then user_comments
          else null
         end USER_COMMENTS
        from t)
    select task_id, sum(hours) total_hours,
      listagg( user_comments  ) within group (order by date_entered desc)
      || case when count(*) >= 5 then '! MORE COMMENTS !' else null end
        as user_comments
    from modified_data
    group by task_id;
    
  • Error ORA-06502

    Request Express 4.1.1.00.23 on database of Oracle 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit - embedded Installation

    I have a dynamic action (instruction) that sets out a numeric field (the rating are digital in the database and objects digital apex page too)
    I want to just this value to be stored in a numeric value.


    declare
    number of l_return;
    Start
    l_return: = nvl(:P7_CURRENT_BALANCE_1,0);
    Return l_return;
    end;


    The statement l_return: = nvl(:P7_CURRENT_BALANCE_1,0); gives the error Ora-06502

    Help, please

    DJ

    Following what fac586 said, if you have specified a format for the P7_CURRENT_BALANCE_1 element mask, then you must consider that too when the conversion of number.

    Kind regards

  • ORA-06502: PL/SQL: digital or value error: character conversion number e

    Hi all
    I work with DBLOCALE , which is
    Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
    PL/SQL Release 10.2.0.3.0 - Production
    CORE     10.2.0.3.0     Production
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Productio
    NLSRTL Version 10.2.0.3.0 - Production
    and DBREMOTE
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production
    CORE     9.2.0.8.0     Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    Leave a procedure on DBLOCALE I run SCHEMA. MYPROCEDURE@dbremote (NUMBER, stringPar VARCHAR2, datePar DATE numberPar)

    I use this procedure only to call a function in a package of DBREMOTE with education booleanresult: = MYPACKAGE. MYFUNC (NUMBER, stringPar VARCHAR2, datePar DATE numberPar)

    In the service, I try to INSERT IN MYTABLE (numberPar, stringPar, datePar) and the error
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    is triggered.

    I missed something basic? Where is my mistake?

    I have check all types of past data and types of data in the table, that I have to insert.

    Any help or suggestion will be appreciated. Feel free to ask me any questions that need me to explain or for more details.

    Best regards
    Alex

    OraclePSP wrote:

    It starts with a page of APEX who call a procedure in DBLOCALE.

    Apex point (page) variables are all text - and bind as text variables when used in PL/SQL and SQL code.

    In this procedure, ii assess the past, then insert into a few tables@DBREMOTE without errors.
    The end of it, I'm calling the remote packaged function.
    In the function I use parameters to open a cursor and insert into MYTABLE.

    That you pass as parameters? The variable element of Apex (e.g. : P1_DATE) or do you attribute the object variable to a PL/SQL variable and the neck of the PL/SQL variable as a parameter?

    Even if I agree with you on the copy & paste I don't know what part of the process, I can speak to you.

    Well, you can try the following. Create a dynamic PL/SQL region on the page. This region should be implemented and made that the page has been sent (in other words, element variables used in the page need value for this region, for the record). You can create a condition for this region that must be met to be made - and this can check the QUERY variable, or to check if the relevant variables have values.

    In this dynamic PL/SQL code for the region block, use HTP.prn () as you would use DBMS_OUTPUT.put_line () in client-server test normal (using TOAD or SQL * more). And in this block of code, call the remote procedure.

    For example

    --// dynamic PL/SQL region code block:
    HTP.prn( 'Item P1_DATE = ['||:P1_DATE||'] 
    ' ); HTP.prn( 'Item P1_NUMBER = ['||:P1_NUMBER||']
    ' ); ..etc.. HTP.prn( 'Calling remote procedure:
    ' ); begin RemoteProc@RemoteDB( param1=>:P1_DATE, param2=>:P1_NUMBER ); HTP.prn( 'Call was successful
    ' ); exception when OTHERS then HTP.prn( 'Call failed with: '||SQLERMM(SQLCODE)||'
    '); end; ..etc..
  • ORA-06502: PL/SQL: digital or value error: character of error number

    Hello gurus,

    I get the following error:
    ORA-06502: PL/SQL: digital or value error: character of number conversion error

    It happens on wizard generated in a table.
    DECLARE
    v_venue_prsntd_qtr varchar2(3);
    v_venue_prsntd_fy  number;
    
    BEGIN
    FOR i IN 1 .. apex_application.g_f02.COUNT
      LOOP
        IF apex_application.g_f05 (i) IS NOT NULL THEN 
            v_venue_prsntd_qtr := 
             Case WHEN TO_CHAR(apex_application.g_f05 (i), 'MON') IN ('OCT','NOV','DEC') THEN '1'
                  WHEN TO_CHAR(apex_application.g_f05 (i), 'MON') IN ('JAN','FEB','MAR') THEN '2'
                  WHEN TO_CHAR(apex_application.g_f05 (i), 'MON') IN ('APR','MAY','JUN') THEN '3'
                  ELSE '4'
                  END;
      -- INTO v_venue_prsntd_qtr
      -- FROM venue_prsntd
      -- WHERE venue_prsntd_seqno = apex_application.g_f02 (i) 
      -- AND dfcy_seqno = apex_application.g_f03 (i)
      -- AND apex_application.g_f05 (i) IS NOT NULL; 
    ----fiscal year
     --    v_venue_prsntd_fy := 
     --       CASE WHEN TO_CHAR(TO_NUMBER(TO_CHAR(apex_application.g_f05(i), 'MMDD'))) < 1001 THEN --------TO_CHAR(apex_application.g_f05 (i),'YYYY')
    --        ELSE TO_CHAR(TO_NUMBER(TO_CHAR(apex_application.g_f05 (i),'YYYY')) + 1) 
    --      END;
    
       --  INTO v_venue_prsntd_fy
       --  FROM venue_prsntd
       --  WHERE venue_prsntd_seqno = apex_application.g_f02 (i) 
       --  AND dfcy_seqno = apex_application.g_f03 (i) 
       --  AND apex_application.g_f05 (i) IS NOT NULL; 
       --  
    ---END IF;
      --- IF apex_application.g_f02 (i) IS NULL AND apex_application.g_f05 (i) IS NOT NULL Then 
              -- INSERT INTO venue_prsntd(venue_prsntd_qtr, venue_prsntd_fy)
              --                   VALUES(v_venue_prsntd_qtr, v_venue_prsntd_fy);
                 UPDATE VENUE_PRSNTD
                      SET VENUE_PRSNTD_QTR = to_number(v_venue_prsntd_qtr)
                         -- VENUE_PRSNTD_FY = v_venue_prsntd_fy
                 WHERE VENUE_PRSNTD_SEQNO = APEX_APPLICATION.G_F03(i);
    END IF;
    END LOOP;
    END;
    I'm trying to update venue_prsntd_qtr. I commented all the rest to see if I can limit the error is coming from.

    QTR is a numeric field in the database. I have gone back and forth with the variable type in the code and still get the same error.

    I use oracle db 10g, apex 3.2.1

    Thank you
    Mary

    Hi, I don't think it's possible to integrate with the routine auto mru. What you can do is to use a trigger to insert database after the cessation of the to do.

    Otherwise, you will still need a separate process Apex which runs after the SRM process.

    Luis

Maybe you are looking for

  • Slow Mac works. Need help for EtreCheck report.

    EtreCheck version: 2.9.12 (265) Report generated 2016-05-25 08:56:29 Download EtreCheck from https://etrecheck.com Duration 08:37 Performance: Below average Click the [Support] links to help with non-Apple products. Click [details] for more informati

  • Can remove photos of an Air iPad

    I transferred several photos of iTunes albums for my iPad long (~ 25GB).  I did some clean up and decided to remove it from the iPad.   When I run iTunes, look to the iPad, click on the photos, it is said that no pictures are synchronized. Looking fo

  • Unable to read or write a CDR/RW but it is [b] no problem reading DVD [/ b].

    Feature: DVD/CD-RW-drive Satellite 2410 DVD_ROM_SD-R2212CD reading and writing worked correctly in the past.Device looks o.k, device drivers seem to be installed correctly.But the CD is reported as"unknown", "unknown datasystem. (User-burned CDs as w

  • HDMI not his TV

    I have a dv5-1388 upgrade to Windows 7. No sound from the tv using the HDMI cable. I looked into the sound folder in the PC and I did not click on an option of HDMI. Now where should I go from here? Thank you

  • HP 15: resolution of the screen.

    How can I change the resolution of the screen in Win 10?