private List<MatrixTestResult> GetPerformanceMatrixResults(GetPerformanceResultsFilter filter)
        {
            List<MatrixTestResult> matrixResults = new List<MatrixTestResult>();

            System.Data.Odbc.OdbcConnection conn = createSQLConnection();
            try
            {

                string mySelectQuery;
                switch (filter)
                {
                    case GetPerformanceResultsFilter.MonoTouch:
                        mySelectQuery = "SELECT *  FROM `PerformanceMatrixTestResults` WHERE `isMonoTouch` = 1 ORDER BY `DBDeviceId` ASC";
                        break;
                    case GetPerformanceResultsFilter.ObjectiveC:
                        mySelectQuery = "SELECT *  FROM `PerformanceMatrixTestResults` WHERE `isMonoTouch` = 0 ORDER BY `DBDeviceId` ASC";
                        break;
                    default:
                        mySelectQuery = "SELECT * FROM `PerformanceMatrixTestResults` ORDER BY `PerformanceMatrixTestResults`.`DBDeviceId` ASC";
                        break;
                }
                System.Data.Odbc.OdbcCommand myCommand = new System.Data.Odbc.OdbcCommand(mySelectQuery, conn);
                conn.Open();
                System.Data.Odbc.OdbcDataReader myReader = myCommand.ExecuteReader();

                try
                {
                    while (myReader.Read())
                    {
                        matrixResults.Add(new MatrixTestResult()
                        {
                            DatabaseId = (int)myReader["id"],
                            DeviceDatabaseId = (int)myReader["DBDeviceId"],
                            CSTestResult = (float)myReader["CSTestResult"],
                            CTestResult = (float)myReader["CTestResult"],
                            BLASTestResult = (float)myReader["BLASTestResult"],
                            IsMonoTouch = Convert.ToBoolean(myReader["isMonoTouch"])
                        });
                    }
                }
                finally
                {
                    myReader.Close();
                }
            }
            finally
            {
                conn.Close();
            }

            return matrixResults;
        }
        private List<PerformanceCubeResult> GetPerformanceCubeResults(GetPerformanceResultsFilter filter)
        {
            List<PerformanceCubeResult> cubeResults = new List<PerformanceCubeResult>();

            System.Data.Odbc.OdbcConnection conn = createSQLConnection();
            try
            {
                //
                string mySelectQuery;
                switch (filter)
                {
                    case GetPerformanceResultsFilter.MonoTouch:
                        mySelectQuery = "SELECT *  FROM `PerformanceGLCubeResults` WHERE `isMonoTouch` = 1 ORDER BY `DBDeviceId` ASC";
                        break;
                    case GetPerformanceResultsFilter.ObjectiveC:
                        mySelectQuery = "SELECT *  FROM `PerformanceGLCubeResults` WHERE `isMonoTouch` = 0 ORDER BY `DBDeviceId` ASC";
                        break;
                    default:
                        mySelectQuery = "SELECT * FROM `PerformanceGLCubeResults` ORDER BY `PerformanceGLCubeResults`.`DBDeviceId` ASC";
                        break;
                }
                System.Data.Odbc.OdbcCommand myCommand = new System.Data.Odbc.OdbcCommand(mySelectQuery, conn);
                conn.Open();
                System.Data.Odbc.OdbcDataReader myReader = myCommand.ExecuteReader();

                try
                {
                    while (myReader.Read())
                    {
                        cubeResults.Add(new PerformanceCubeResult()
                        {
                            DatabaseId = (int)myReader["id"],
                            DeviceDatabaseId = (int)myReader["DBDeviceId"],
                            NumberOfTriangles = (int)myReader["NumberTriangles"],
                            FramesPerSecond = (double)myReader["FramesPerSecond"],
                            IsMonoTouch = Convert.ToBoolean(myReader["isMonoTouch"])
                        });
                    }
                }
                finally
                {
                    myReader.Close();
                }
            }
            finally
            {
                conn.Close();
            }

            return cubeResults;
        }