title: getting Invalid column index when calling Procedural
body: <p>I have Procedural that is takes two String arguments and returns Integer value from database Oracle 10g .</p>
  
  <p>When try to print out the result I'm getting Invalid column index .</p>
  
  <p>the code is </p>
  
  <pre><code>  try {
  
  
               Dbconnection NewConnect = new Dbconnection();
               Connection con = NewConnect.MakeConnect();
  
              CallableStatement stmt1 = ((Connection) con).prepareCall("{ call login (?, ?, ?)}");
              stmt1.registerOutParameter(1, Types.INTEGER);
              stmt1.setString(2, "ahmed");
              stmt1.setString(3, "ahmed");
  
               ResultSet rslt = stmt1.executeQuery();
  
               if (rslt.next())
               {
  
                   System.out.println( rslt.getInt(1)); 
               }
  </code></pre>
  
  <p>Procedural  login </p>
  
  <pre><code>   create or replace 
      PROCEDURE login
  
          (p_username  teacher.username%TYPE,
                      p_password  teacher.password%TYPE)
  
  
      IS
             v_teacher_id   teacher.teacher_id%TYPE;
                        v_username    teacher.username%TYPE ;
             v_password     teacher.password%TYPE ;
  
  
      BEGIN
  SELECT   teacher_id, username , password
  INTO    v_teacher_id , v_username , v_password
  FROM    teacher
  
   where username = p_username and password =p_password  ;
  
              DBMS_OUTPUT.PUT_LINE (v_teacher_id);
  
  
  
       end login ;
  </code></pre>