5 Replies Latest reply: Feb 8, 2013 7:50 AM by 834338 RSS

    Problem with comments?

    834338
      Hello,

      We use Oracle 11.2.0.3.0 with Application Express 4.1.1.00.23.

      In an 'On Load - After Header' process, we commented out a piece of code:

      /*
      IF :APP_TEAM_COMPATIBILITY = 0 THEN
      :P613_DELETABLE := 0;

      END IF;

      */

      After 'Apply Changes' we haven't got any error message. The process was tested, and it worked well. Then, in the production system, dozens of users got this errormessage:

      ORA-06550: Zeile 43, Spalte 3: PLS-00103: Encountered the symbol ";" when expecting one of the following: ( begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge The symbol "exit" was substituted for ";" to continue.

      We deleted the commented part, and now it works again.

      Could you please explain what happened?
      Is that allowed to use /**/-type comments in processes?

      Thanks in advance
        • 1. Re: Problem with comments?
          fac586
          komeny wrote:
          Hello,

          We use Oracle 11.2.0.3.0 with Application Express 4.1.1.00.23.

          In an 'On Load - After Header' process, we commented out a piece of code:
          Always post code using <tt>\
          ...\
          </tt> tags as described in the FAQ.
          /*
          IF :APP_TEAM_COMPATIBILITY = 0 THEN
          :P613_DELETABLE := 0;
          
          END IF;
          
          */
          After 'Apply Changes' we haven't got any error message. The process was tested, and it worked well. Then, in the production system, dozens of users got this errormessage:

          ORA-06550: Zeile 43, Spalte 3: PLS-00103: Encountered the symbol ";" when expecting one of the following: ( begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge The symbol "exit" was substituted for ";" to continue.

          We deleted the commented part, and now it works again.

          Could you please explain what happened?
          Is that allowed to use /**/-type comments in processes?
          Post the complete process code, with and without the comments.

          It would also be a good idea to try to reproduce the problem with a simple test case on apex.oracle.com.
          • 2. Re: Problem with comments?
            834338
            Sorry, I forgot to give you an important piece of information: the code which is commented out, was the last part of the process.

            I don't want to publish the whole process, so this is the main structure of it:
            SELECT ...
            INTO ...
            FROM ....
            WHERE ....;
            
            SELECT COUNT(*) 
            INTO ...
            FROM ...
            WHERE ....;
            
            IF :P613_ITEM1 < :P613_ITEM2 THEN
              :P613_DELETABLE := 1;
            ELSE
              :P613_DELETABLE := 0;
            END IF;
            
            IF :P613_ITEM3 IS NULL THEN
             :P613_DELETABLE := 0;
            END IF;
            
            /*
            IF :APP_TEAM_COMPATIBILITY = 0 THEN
              :P613_DELETABLE := 0;
             
            END IF;
             
            */
            • 3. Re: Problem with comments?
              Joni Vandenberghe
              There is no problem in Apex with using comments in a process, it is just an anonymous block in PL/SQL. You can plce em just the way you place them.

              So your error is coming from something else but without an example at apex.oracle.com or the full code (the error is at line 43 and we only get 27 lines), we can't help you more then this.

              Edited by: Joni Vandenberghe on 8-feb-2013 4:59
              • 4. Re: Problem with comments?
                834338
                Thank you, I will try to create an example when I will have time.
                • 5. Re: Problem with comments?
                  834338
                  Anyway the content of the process is irrelevant, because it works without the comment part, and it didn't work with the comment part. There was no other difference.
                  I will try to reproduce the error.