protected boolean executeCall(
      Tds tds,
      String name,
      ParameterListItem[] formalParameterList,
      ParameterListItem[] actualParameterList)
      throws SQLException {
    boolean result;
    boolean wasCanceled = false;

    try {
      SQLException exception = null;
      PacketResult tmp = null;

      // execute the stored procedure.
      tds.executeProcedure(name, formalParameterList, actualParameterList, this, timeout);

      result = getMoreResults(tds);
      /*
      while (tds.isErrorPacket() || tds.isMessagePacket())
      {
         tmp = tds.processSubPacket();
         exception = warningChain.addOrReturn((PacketMsgResult)tmp);
         if (exception != null)
         {
            throw exception;
         }
      }
      while(tds.isDoneInProc())
      {
         tmp = tds.processSubPacket();
      }
      if (tds.isProcId())
      {
         tmp = tds.processSubPacket();
      }
      if (tds.isResultSet())
      {
         result = true;
      }
      else
      {
         result = false;
         boolean done = false;
         do
         {
            tmp = tds.processSubPacket();
            if (tmp instanceof PacketEndTokenResult)
            {
               done = ! ((PacketEndTokenResult)tmp).moreResults();
               wasCanceled = wasCanceled
                  || ((PacketEndTokenResult)tmp).wasCanceled();
               updateCount = ((PacketEndTokenResult)tmp).getRowCount();
            }
            else if (tmp instanceof PacketOutputParamResult)
            {
               if (CallableStatement_base.class.isInstance(this))
               {
                  ((CallableStatement_base)this).addOutputParam(
                     ((PacketOutputParamResult)tmp).getValue());
               }
            }
            else if (tmp.getPacketType()
                     == TdsDefinitions.TDS_RET_STAT_TOKEN)
            {
               // nop
            }
            else if (tmp instanceof PacketMsgResult)
            {
               exception = warningChain.addOrReturn((PacketMsgResult)tmp);
               if (exception != null)
               {
                  throw exception;
               }
            }
            else
            {
               throw new SQLException("Protocol confusion"
                                      + "Found a "
                                      + tmp.getClass().getName()
                                      + " (packet type 0x"
                                      + Integer.toHexString(tmp.getPacketType()
                                                            & 0xff)
                                      + ")");
            }
         } while (!done);
      }
       */
    } catch (TdsException e) {
      e.printStackTrace();
      throw new SQLException(e.getMessage());
    }
    /*
    catch(java.io.IOException e)
    {
       e.printStackTrace();
       throw new SQLException(e.getMessage());
    }
     */
    finally {
      tds.comm.packetType = 0;
    }
    if (wasCanceled) {
      throw new SQLException("Query was canceled or timed out.");
    }
    return result;
  }