missing semicolon leads to confusing message during compilation

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 1.2.2
    • Component/s: tools
    • x86
    • windows_95



      Name: skT88420 Date: 08/25/99


      I use the following code for calling a Stored procedure.

      CallableStatement cs=c.prepareCall("{?=call sp_return(?,?)}");
      .............
      .............
      cs.registerOutParameter (1,java.sql.Types.INTEGER);
      cs.setInt (2,12);
      cs.registerOutParameter (3,java.sql.Types.INTEGER);
      cs.executeUpdate();

      int i=cs.getInt(1);
      .............
      ..........

      Problem here is when i miss a semicolon accidently after cs.setInt the following message occurs:
      Invalid type expression
             cs.setInt (2,12)
      Invalid declaration
              cs.registerOutParameter (3,java.sql.Types.INTEGER);

      In other cases it gives the message ";" expected.

      It would be nice if compiler gives the same message for all missing ";" istead of giving the misleading messages like above.

      Thanks
      (Review ID: 94383)
      ======================================================================

            Assignee:
            Iris Clark
            Reporter:
            Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: