public Trace [] getMultiTraces_v2(GeoTag [] geoTags){
        
        // the returned traces object:
        Trace [] traces = new Trace[geoTags.length];

        // ResultSet objects:
        ResultSet resultSet;

        try
        {
            // parameterIndex:
            int parameterIndex = 1;
            
            // set parameters of the statements:
            for (int p=0; p < geoTags.length; p++)
            {
                // x values:
                pStatement.setInt((parameterIndex++), (geoTags[p].x));
                
                // y values:
                pStatement.setInt((parameterIndex++), (geoTags[p].y));
                
                // source id:
                pStatement.setInt((parameterIndex++), geoTags[p].sourceID);
                
            }//for
            
            // if points (geo-tags) are less than the multi-statement length,
            // set remaining parameters to 0:
            for (int p=geoTags.length; p < (this.multiStatementLength); p++)
            {
                // x values:
                pStatement.setInt((parameterIndex++), (0));
                
                // y values:
                pStatement.setInt((parameterIndex++), (0));
                
                // source id:
                pStatement.setInt((parameterIndex++), 0);
                
            }//for
                

            // [TEST] measure execution time:
//            long startTime = System.currentTimeMillis();

            // run the multiple query in one go:
            pStatement.execute();

            // [TEST] get end time and print:
//            long endTime = System.currentTimeMillis(); 
//            FESVoSystem.out.println("Executed query in " + (endTime - startTime) + " ms.");
//            FESVoSystem.out.print((endTime - startTime) + " ");
            
            
            // [TEST] measure time for getting resultSet:
//            startTime = System.currentTimeMillis();
            
            // get resultSet for each statement
            for (int i=0; i < traces.length; i++)
            {
                // get result set:
                resultSet = pStatement.getResultSet();

                // if no row is available, return null
                if (resultSet.next()){
                    byte [] samples = resultSet.getBytes(1);
                    
                    // [TEST] print some trace samples: (17/3/2012)
//                    if (this.tracesToPrint > 0){
//                        ByteBuffer tempBuffer = ByteBuffer.wrap(samples);
//                        tempBuffer.order(ByteOrder.LITTLE_ENDIAN);
//                        DataAnalyzer.writeFloatBufferToFile(tempBuffer.asFloatBuffer(), "trace_"+tracesToPrint+".txt");
//                        tracesToPrint--;
//                    }
                    
                    traces[i] = new Trace(geoTags[i]);
                    traces[i].setSamples(this.removeTraceHeader(samples));
                }//if
                
                // move to next result set:
                pStatement.getMoreResults();
            }
                
            
            // [TEST] get end time and print:
//            endTime = System.currentTimeMillis(); 
//            FESVoSystem.out2.println("Got results in " + (endTime - startTime) + " ms.");
//            FESVoSystem.out2.print((endTime - startTime) + " ");

        }//try

        catch(SQLException ex)
        {
            // A SQLException was generated.  Catch it and display
            // the error information.
            // Note that there could be multiple error objects chained
            // together.
            System.out.println();
            System.out.println("*** SQLException caught ***");

            while (ex != null)
            {
                System.out.println(" Error code: " + ex.getErrorCode());
                System.out.println(" SQL State: " + ex.getSQLState());
                System.out.println(" Message: " + ex.getMessage());
                //ex.printStackTrace();
                System.out.println();
                ex = ex.getNextException();
            }

            throw new IllegalStateException ("Sample failed.") ;

        }//catch

        // return traces array
        return traces;
    }//getMultiTraces_v2