Procedure procedure = null;         ParameterUtils.verifyThatParametersAreSet( parameterList );     ParameterUtils.createParameterMapping(rawQueryString, parameterList, tds); StringBuffer signature = new StringBuffer(); signature.append(rawQueryString); for (int i = 0; i < parameterList.length; i++) { signature.append(parameterList[i].formalType); }    procedure = findCompatibleStoredProcedure( tds, signature.toString());   if( procedure == null ) {   procedure = new Procedure(rawQueryString, signature.toString(), tds.getUniqueProcedureName(), parameterList, tds );     submitProcedure( tds, procedure );   tds.addStoredProcedure(procedure); }  return internalExecuteCall(procedure.getProcedureName(), procedure.getParameterList(), parameterList, tds, warningChain);
Tds tds = getTds(); return execute( tds );
    public boolean execute( Tds tds ) throws SQLException    {        //        // TDS can handle prepared statements by creating a temporary        // procedure.  Since procedure must have the datatype specified        // in the procedure declaration we will have to defer creating        // the actual procedure until the statement is executed.  By        // that time we know all the types of all of the parameters.        //        Procedure procedure = null;        // SAfe No need for this either. We'll have to consume all input, nut        //      just the last ResultSet (if one exists).//        closeResults(false);        // SAfe No need for this. getMoreResults sets it to -1 at start, anyway//        updateCount = -2;        // First make sure the caller has filled in all the parameters.        ParameterUtils.verifyThatParametersAreSet( parameterList );        // MJH        // Create a unique signature for this the procedure by including parameters        //        ParameterUtils.createParameterMapping(rawQueryString,                                             parameterList,                                             tds);        StringBuffer signature = new StringBuffer();        signature.append(rawQueryString);        for (int i = 0; i < parameterList.length; i++)        {            signature.append(parameterList[i].formalType);        }        // Find a stored procedure that is compatible with this set of parameters if one exists.        // MJH Lookup now includes parameter list        procedure = findCompatibleStoredProcedure( tds, signature.toString());        // if we don't have a suitable match then create a new temporary stored procedure        if( procedure == null )        {            // Create the stored procedure            // MJH Pass in the caculated signature to be used as the cache key            procedure = new Procedure(rawQueryString, signature.toString(),                tds.getUniqueProcedureName(), parameterList, tds );            // SAfe Submit it to the SQL Server before adding it to the cache or procedures of transaction list.            //      Otherwise, if submitProcedure fails (e.g. because of a syntax error) it will be in our procedure            //      cache, but not on the server.            submitProcedure( tds, procedure );            // store it in the procedureCache            tds.addStoredProcedure(procedure);        }        return internalExecuteCall(procedure.getProcedureName(), procedure.getParameterList(), parameterList, tds,            warningChain);    }