Bug: Validate PL/SQL code not working?

Hallo,
in the newer versions of Apex there seems to be an issue with Process code validation.
It doesn't make any difference if i check the
"Do not validate PL/SQL code (parse PL/SQL code at runtime only)" option or if i don't.
There is no parsing of the code and i can write the worst syntax without any problem resulting in bad runtime errors. However the parsing of Region SQL and PL/SQL is working well.
Anybody knows what this is ?
Thanks,
Jochen
Message was edited by:
Jochen.Zehe

I think I know what is happening.
On the Create Process wizard, when you enter your PL/SQL code in
http://i14.tinypic.com/4qxai38.jpg
and click the Next button, the code is parsed and throws an error if it has syntax errors. But if you click on the Create Process button, the process is created, regardless of whether it has syntax errors or not!
Similarly, the Edit Page Process page also doesn't appear to validate the code, it happily saves the process with any nonsense in the Process Source box, even when the "Do not parse code" checkbox is unchecked (default)
Definitely a bug (not sure if it is regression from 2.x or not)

Similar Messages

  • SQL Code not working in Forms Developer?

    Hi all,
    I'm using Oracle 10g and I have th following code running on iSQL+ but not working on Forms and I got the following erro
    The SQL code:
         select returningreason
            from (
                     select returningreason,
                     dense_rank() over (partition by 1 order by count(*) desc) as drnk
                     from returned_goods
                     group by returningreason)
           where drnk = 1;And the error happens near the word over to the right and the error statement is:
    Error 103 at line 18, column 19
       Encountered the symbol "(" when expecting one of the following:
             , formThanks in advance :)

    Triggers are compiled in forms so need to use only the features available to forms, which doesn't include all the new stuff in the database.
    select over partition
    NVL2They don't work in forms and reports too.
    Also if you use them in record Group
    Forms/SQL Compiler was not lined up to the database(10G).
    Meanwhile,for example. Pipelined TABLE and relative Select work in Reports AND Forms.

  • SQL code not working inside Java

    Below is my code from java. here, i'm trying to execute below sql code inside my java coding. its preety straight -
    ResultSet rs = null;
    PreparedStatement prepStmt = null;
    String statement="select * from TIMINGTABLE WHERE COUNTRY = 'USA' AND RE_DATE >= TO_DATE('04/11/2012','MM/DD/YYYY') order by COUNTRY";
    prepStmt = con.prepareStatement(statement);
    rs = prepStmt.executeQuery();
    dats it. but, its giving this error ---- SQL syntax error: the token "(" was not expected here
    now, here, when i simply remove this part from the above sql line ----- AND RE_DATE >= TO_DATE('04/11/2012','MM/DD/YYYY') -----the code works perfectly.
    RE_DATE is a date field in the sql table.
    I even tried this option too - TO_DATE(RE_DATE, 'MM/DD/YYYY') >= TO_DATE('04/11/2012','MM/DD/YYYY')
    which is giving same error
    please help
    -prodyut

    927428 wrote:
    Below is my code from java. here, i'm trying to execute below sql code inside my java coding. its preety straight -
    ResultSet rs = null;
    PreparedStatement prepStmt = null;
    String statement="select * from TIMINGTABLE WHERE COUNTRY = 'USA' AND RE_DATE >= TO_DATE('04/11/2012','MM/DD/YYYY') order by COUNTRY";
    prepStmt = con.prepareStatement(statement);
    rs = prepStmt.executeQuery();
    dats it. but, its giving this error ---- SQL syntax error: the token "(" was not expected here
    now, here, when i simply remove this part from the above sql line ----- AND RE_DATE >= TO_DATE('04/11/2012','MM/DD/YYYY') -----the code works perfectly.
    RE_DATE is a date field in the sql table.
    I even tried this option too - TO_DATE(RE_DATE, 'MM/DD/YYYY') >= TO_DATE('04/11/2012','MM/DD/YYYY')
    which is giving same error
    please help
    -prodyutWhat kind of DB you use?
    How do you connect to it?
    (If you use ODBC for example, that won't work)

  • PL/SQL Code not working without debug statements

    Hi Guys,
    I have a pl/sql code in a procedure, logic iterates through almost 40K records, conditional delete and update.
    When I execute this code, I dont see the deletes and updates happening, though procedure executes for 8 minutes and exits wihtout any error, execption.
    In same procedure when I write some debug statements like dbms_output, then everything seems to be working fine.
    I know this scenario happens in Oracle Forms, wehre we use SYNCHRONIZE.
    But this is plain pl/sql procedure.
    any thoughts on this?
    Av.

    COMMIT ?
    Aside from that, no idea what your procedure looks like, what it does, what version of Oracle you are using, how you are determining "I dont see the deletes and updates happening". etc...
    You'd need to provide a slew of information for anyone to give you any meaningful help.
    I can only assure you that DBMS_OUTPUT doesn't do magic :)

  • SQL Code not working in Forms Developer without Functions?

    Hi all,
    I've write this code into Forms at it's work correctly in SQL and the following error occurened
    The PL-SQL Code:
    DECLARE
         Product_Name Products.Name%TYPE;
         Most_Occurence NUMBER(10);
    BEGIN
         SELECT *
         INTO Most_Occurence, Product_Name
      FROM (SELECT   COUNT (returned_goods.ID) AS "Max Occurence", products.Name
      FROM Returned_Goods
      JOIN Products
      ON returned_goods.productId = products.Id
             GROUP BY returned_goods.productId, products.Name
             ORDER BY COUNT (returned_goods.ID) DESC)
    WHERE ROWNUM = 1;
    END;The error message (appears near JOIN Products) :
       Encountered symbol "PRODUCTS" when expecting one of the following:
          ), with group having intersect minus order start union where connectThanks in advance
    Edited by: ZiKaS on Dec 30, 2008 8:57 AM

    Now...obviously you can't use ansi join syntax in that forms module. So rewrite your query with
    FROM returned_goods, products
    WHERE returned_goods.productId = products.id
    hth

  • PL/SQL code not working

    why is this code giving me error?
    declare
    type dept_tab_type is table of departments%rowtype;
    index by binary_integer;
    dept_tab dept_tab_type;
    v_counter number(3):= 270;
    begin
    for i in 10..v_count
    loop
    select * into dept_tab(i)
    from departments
    end loop;
    for i in dept_tab.first..dept_tab.last
    loop
    DBMS_OUTPUT.PUT_LINE(dept_tab(i).department_name);
    end loop;
    end;
    i got this error
    ORA-06550: line 3, column 5:
    PLS-00103: Encountered the symbol "INDEX" when expecting one of the following:
    begin function package pragma procedure subtype type use
    <an identifier> <a double-quoted delimited-identifier> form
    current cursor

    I think its you DEPT_TAB_TYPE deceleration which was incorrect.
    I think this might do it;
    set serveroutput on
    declare
      type dept_tab_type is table of departments%rowtype index by binary_integer;
      dept_tab dept_tab_type;
      v_counter number(3):= 270;
    begin
      for i in 10..v_counter loop
        select *
        into dept_tab(i)
        from departments
      end loop;
      for i in dept_tab.first..dept_tab.last loop
        DBMS_OUTPUT.PUT_LINE(dept_tab(i).department_name);
      end loop;
    end;
    /BUT
    UNTESTED!

  • What will you do if any SQL is not working.in oracle 10g...apps 11.5.10.2

    What will you do if any SQL is not working. in oracle 10g....apps 11.5.10.2

    928714 wrote:
    yes sir.If you help me in answering my questions i wll be very thankful to you sir.
    tnx,I haven't a clue.
    As you have been advised in many of your posts, go study the documentation for whichever specific topic you are interested in.
    For me to answer your questions, I would need to go get that documentation.
    Then I would need to read that documentation.
    Then I would need to write a forum post that interprets what I think I learned from that documentation.
    It is so very much faster if YOU go do that instead of posting to a forum and expecting others to do it. You will remember what you study for a lot longer time if you teach yourself.

  • Force encryption on SQL Server not working?

    Hello Everyone,
    I'm running SQL Server 2008 64-bit. I've installed a self-signed cert on the box and set  "Force Encryption"  and restarted SQL server. 
    I setup a client machine to trust the authority of the cert installed on the server. When I connect to that SQL server from SSMS from a client machine and select the "encrypt connection" option in the client Connection properties, SSMS correctly complains
    that the cert on the server does not match the computer name I asked to log into . This is because, although the cert is trusted, the dns name dos not match the CN in the cert <- Perfect, exactly what I am expecting.
    When I connect to the same SQL server from the same client but  UNCHECK "encrypt connection" on the client, I'm able to login. Considering I've checked the "Force Encryption" on the server, the server should have rejected the connection. Why not?
    Ameer Deen

    Hi all,
    We are implementing a Merge Synchronization solution which involves three SQL Servers located on three Azure locations worldwide and one on-premises location. We need to secure communications between all servers. We are evaluating the encryption of all server
    communications through SSL:
    http://technet.microsoft.com/en-us/library/ms191192.aspx
    When we configure one server (let’s call it server A) to accept only encrypted connections (with Force Encryption=Yes) we still can connect from other server (let’s call it server B) that do not have the certificate installed. We would expect the server
    B to fail in the attempt of connect as server A should only accept encrypted communications and those should need the certificated to encrypt/decrypt everything (commands and data).
    We have also review the following forum post that is very similar to this one:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bde679d9-ff83-4fa7-b402-42e336a97106/force-encryption-on-sql-server-not-working
    In all cases the Microsoft answer is:
    “When the
    Force Encryption option for the Database Engine is set to YES, all communications between client and server is encrypted no matter whether the “Encrypt
    connection” option (such as from SSMS) is checked or not. You can check it using the following DMV statement”
    When we run the provided DMV statement to check if encryption is enabled:
    -- To check whether connections are encrypted between server and clients
    SELECT encrypt_option
    FROM sys.dm_exec_connections
    We get “TRUE”. So theoretically encryption is enabled.
    Then:
    Why can we run SQL statements against server A from server B (with SSMS) without any certificate?
    Are we wrong when we expect server A to refuse any client that do not have the right certificate?
    How can server B, without any certificate, decrypt the data encrypted by server A?
    Our intention is to encrypt all server in the same way so all of them will accept only encrypted communications. We are assuming that the Merge Agent will be able to communicate with the Publisher and the Subscriber through this encrypted environment. May
    anyone please confirm ti?
    Thanks for your help.
    Best Regards
    Benjamin Moles

  • PS4 Game Voucher Code not working

    my PS4 Game Voucher Code not working and says: "The code you entered may not be correct or may no longer be valid" "Please check your entry (e-820000134)  

    Voucher codes are region-specific. For instance a US voucher won't work with a UK account. First thing to check is whether the voucher's region matches your account's region.

  • Sql is not working after changing from MsAccess into sql server

    Following Sql  is not working after changing from MsAccess into sql server. 
    sum(trn.sales) as sales,
    sum(trn.cost) as cost,
    sales - cost as profit // Here is not working . can we not use sales a column. Please advise
    from trn
    Kind Regards
    pol
    polachan

    It will not work if use two different column from the table or column  from two  different table
    Example
    sum(trn.sales * trn.rate) as salesAmount,
    sum(trn.cost) as cost,
    sum(trn.salesAmount)-sum(trn.cost) as profit ----- Here is not working . can we not use sales a column. Please advise
    from trn
    Regards
    polachan

  • Pl/sql Clob code not works for database table but works for collection!

    Dear friends
    I modified pl/sql code to insert large data for clob column ın ORACLE APEX , It works for collection (I modified it to work for both)
    the modified code is blod
    declare
    aClob1 clob := empty_clob;
    aClob2 clob ;
    begin
    dbms_lob.createtemporary( aClob1, false, dbms_lob.SESSION );
    for i in 1..wwv_flow.g_f01.count loop
    dbms_lob.writeappend(aClob1,length(wwv_flow.g_f01(i)),wwv_flow.g_f01(i));
    end loop;
         apex_collection.create_or_truncate_collection(p_collection_name => 'CLOB_CONTENT');
         apex_collection.add_member(p_collection_name => 'CLOB_CONTENT',p_clob001 => aClob1);
         htmldb_application.g_unrecoverable_error := TRUE;
    select cc into aClob2 from tt where id = 21 for update ;
    dbms_lob.write(aClob2,Length(aClob1),1,aClob1); commit;
    end;
    but the charcters more than 8100 not be saved to database clob column !
    regards
    Edited by: Siyavus on Jan 30, 2009 5:26 PM
    Edited by: Siyavus on Jan 30, 2009 5:29 PM

    Dear Thomas
    dbms_lob.write(aClob2,*dbms_lob.getlength*(aClob1),1,aClob1); commit;
    I tried it ( dbms_lob.getlength(aClob1) ) but the result is the same
    regards

  • BUG: Oracle Schema Processor does not work in Servlets

    We found a bug with Oracle's Schema Processor. It does not work in Servlets.
    When we try to validate a XML document in a Servlet it does not work, but we can execute the same code in a stand alone application and it works.
    The following is the code we are using:
    try {
    File f =new File(filename);
    FileReader r = new FileReader(f);
    DOMParser dp = new DOMParser();
    URL url = createURL (filename);
    dp.setValidationMode(false);
    dp.setSchemaValidationMode(true);
    dp.setPreserveWhitespace(true);
    dp.parse(url);
    System.out.println("it is parsed");
    } catch(Exception e){System.out.println("there is Error"+e.getMessage());}
    null

    I don't think this is related to Servlets per se.
    Check that the Schema processor classes used by the servlet container, and your application are the same.
    Java does not have proper versioning of classes, I have seen many applications collapse. People compiled their code on developer machines, where it worked fine, but when moved to a production machine they failed because the production machine had a different version of classes. Usually the name of the class doesn't change, but either a method or a variable is missing in several classes. VM doesn't complain but simply crashes.
    In your Schema Processor classes that are used by the servlet engine might be different from the one that the app uses. Do a search on the file system to see how many copy of the same class bundle (zip, jar) you have on the system.

  • PL/SQL update not working against 9iR2 DB

    Hi,
    I am having a weird problem with several forms when run against a 9iR2 database. I have worked out that the problem only happens when referencing an unbound item in the WHERE clause of the update clause. For example:
    UPDATE table_a
    SET column_a = 'A value'
    WHERE column_b = :block.unbound_item;
    When I generate forms from Designer with this type of PL/SQL in a when-button-pressed trigger, it works fine against an 8.1.7 DB but does not update the record against a 9iR2 DB. If I put a specific value in the WHERE clause instead of referencing the unbound item, then it works. It also works if I put the value of the unbound item in a variable and then use the variable in the WHERE clause.
    If I create a simple form using Form Builder, which does not link to Headstart libraries, then it does work against a 9iR2 DB. I also tried generating a simple form out of Designer from a container not linked to Headstart libraries and that worked as well.
    Has anyone come across this sort of thing before?
    Thanks.
    Pierre.

    Pierre,
    I have heard from another customer that had a similar problem. I have not had time yet to investigate his solution, but maybe it can help you:
    For the other customer it seems to work fine if the update raises a CAPI error, but it does not work if the update raises a server error or a TAPI error (PK/UK/FK violation). The problem is that the rollback in abort_transaction is not executed.
    The other customer proposes the following solution:
    * in abort_transaction, don't clean up the error messages
    * in the exception handler of the button code, place the abort_transaction before the unhandled_exception.
    Pierre, do you also use CDM RuleFrame? Can you try if the tips of the other customer work for you?
    It sounds to me like this is a workaround for a database bug, which is OK, but it's better if the database bug is fixed. I would advise you to also check the available patches for 9iR2, or maybe report a bug yourself so a patch can be made in the future.
    It may also be related to the optimizer mode. See thread Transactions fail when OPTIMIZER_MODE=choose .
    Hope this helps,
    Sandra Muller

  • PL/SQL program not working when connect database via SqlNet

    Hi,
    This is a segment of a PL/SQL program before opening a cursor using input descriptor. It is working fine ( to get the value of unOutputCount ) without connect to a database via SqlNet, can anyone tell me why it is not working ( unOutputCount return 0)while connecting to a database via SqlNet and how to make it work without opening a cursor before DESCRIBE OUTPUT ...?
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'input_111'
    WITH MAX 100;
    EXEC SQL ALLOCATE DESCRIPTOR GLOBAL 'output_111'
    WITH MAX 100;
    EXEC SQL PREPARE STMT1 FROM :psSqlStatement;
    EXEC SQL DECLARE CURSOR1 CURSOR FOR STMT1;
    EXEC SQL DESCRIBE INPUT STMT1
    USING DESCRIPTOR GLOBAL 'input_111';
    /* Get count of input parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'input_111' :unInputCount = COUNT;
    EXEC SQL DESCRIBE OUTPUT STMT1
    USING DESCRIPTOR GLOBAL 'output_111';
    /* Get count of output parameters in statement */
    EXEC SQL GET DESCRIPTOR GLOBAL 'output_111'
    :unOutputCount = COUNT;

    Hi,
    Welcome to Oracle OTN Forums!
    I changed your code a little. I think this help you
    CREATE OR REPLACE
    PROCEDURE xx_test
    IS
      v_pid VARCHAR2(100);
      v_cn  VARCHAR2(100);
      v_id  VARCHAR2(1000);
      v_val VARCHAR2(1000);
      CURSOR C1
      IS
        (SELECT product_id, 'PRODUCT_ID'  cn
            FROM product1 );
      BEGIN
        FOR V1 IN C1
        LOOP
          FETCH C1 INTO v_pid, v_cn;
          dbms_output.put_line('==== '||v_pid||'==== '||v_cn);
          EXECUTE IMMEDIATE
          'SELECT product_id, DECODE(COUNT (product_id),1,MAX (product_id))||'''||V_CN||''' as val
            FROM product1
           WHERE product_id =:a
           GROUP BY product_id)' INTO v_id, v_val USING v_pid;
          dbms_output.put_line('==== '||v_id||'==== '||v_val);
          EXECUTE IMMEDIATE 'UPDATE product2 SET '||v_cn||' = ' ||''''|| v_val ||''''|| ' WHERE product_id = :b' USING v_pid;
          dbms_output.put_line('++++ '||v_cn||'++++ '||v_val||'++++ '||v_pid);
        END LOOP;
      END xx_test;

  • My first PL/SQL block not working with using Select query within begin

    I am new to PL/SQL , just started with basics of BLOCKS .
    I am having a query here in executing a block .
    When i am doing a insert oprtation in Blocks Begin method everything is working fine , but when ever i tried to do select operation , some error is being thrown .
    First of all This is my Table :
    select from try :*
    KEY      VALUE
    Key     Value
    Key1     Value1
    Key2     Value2
    Key3     Value3
    ======================
    This is the code which is not working : Please see the code and tell me what is the problem .
    DECLARE
    v_KEY    VARCHAR2(20);
    v_VALUE   VARCHAR2(20);
    BEGIN
    select key into v_KEY FROM try where v_value='Value' ;
    dbms_output.put_line(v_KEY);
    END;
    When i run this code , it is saying Data Not Found on this line " select key into v_KEY FROM try where v_value='Value' ;"
    wheer when i run tis individually it worked fine :
    select KEY FROM try where VALUE='Value' ;"
    please share your ideas .as why it isn't running ??
    Edited by: user10503747 on Sep 20, 2010 3:16 AM

    Hi,
    user10503747 wrote:
    I am new to PL/SQL , just started with basics of BLOCKS .
    I am having a query here in executing a block .
    When i am doing a insert oprtation in Blocks Begin method everything is working fine , but when ever i tried to do select operation , some error is being thrown .
    First of all This is my Table :
    select from try :*
    KEY      VALUE
    Key     Value
    Key1     Value1
    Key2     Value2
    Key3     Value3
    ======================
    This is the code which is not working : Please see the code and tell me what is the problem .
    DECLARE
    v_KEY    VARCHAR2(20);
    v_VALUE   VARCHAR2(20);
    BEGIN
    select key into v_KEY FROM try where v_value='Value' ;
    dbms_output.put_line(v_KEY);
    END;
    When i run this code , it is saying Data Not Found on this line " select key into v_KEY FROM try where v_value='Value' ;"
    wheer when i run tis individually it worked fine :
    select KEY FROM try where VALUE='Value' ;"
    please share your ideas .as why it isn't running ??
    Edited by: user10503747 on Sep 20, 2010 3:16 AMInstead of:
    {code}
    select key into v_KEY FROM try where v_value='Value' ;
    {code}
    perhaps you meant something like:
    {code}
    v_value := 'Value1';
    select key into v_KEY FROM try where v_value=Value ; -- No quotes
    {code}
    Until you assign a vlue to a variable, like v_value, it is NULL, so your original statement was equivalent to
    {code}
    select KEY FROM try where NULL='Value' ;
    {code}
    In PL/SQL, a SELECT ... INTO statement must return exactly one row, or else you will get an error (either NO_DATA_FOUND or TOO_MANY_ROWS). This is different from SQL, where a query cn return any number of rows, including 0, without raising an error.

Maybe you are looking for

  • How to print logical page number in TOC of report

    My report has three sections - header, main, trailer. after each group break in the main section the page number is saved using the srw.get_page_num(pageNum). this records are used to build the toc in the trailer section. Problem: srw.get_page_num de

  • ME28 Cancel release of purchase order

    Hello, when I try to perform a cancellation of a release of a PO I get an error message: ME 175 Document already treated. Function not possible It should be possible to cancel the release of alll released purchase orders. Can you help me? Thanks a lo

  • SQLLDR direct path allows duplicates in primary key

    I would like to use sqlldr direct path to load millions of records in the table but direct path allows duplicates on the primary key constraints. inserts duplicates sqlldr deploy_ctl/deploy_ctl@dba01mdm control=ctl_test.ctl direct=true primary key is

  • Defining Schedules on MDS9500

    If I do not want to use CLI, is there an option using DM or FMS to define schedules & jobs on MDS9500? If there is how do I navigate?

  • Can SSH locally but not remotely

    I have seen many thread on this and I cannot understand why it is not working for me. I had SSH server working yesterday and today it stopped working. /etc/hosts.allow # /etc/hosts.allow sshd: ALL # End of file ~ /etc/hosts.deny # /etc/hosts.deny ALL