public void ExecuteQuery()
        {
            ArrayList solutions = new ArrayList();

            if (SolutionIsPossible)
            {
                MySqlDataReader dataReader = null;
                try {
                    dataReader = itsTriples.ExecuteSqlQuery(itsQuerySql);
                    while (dataReader.Read())
                    {
                        QuerySolution solution = new QuerySolution();
                        int           col      = 0;
                        foreach (Variable var in itsSelectedVariables)
                        {
                            object resourceHash = dataReader.GetValue(col);
                            if (!resourceHash.Equals(DBNull.Value))
                            {
                                Resource resource = new Resource(Convert.ToInt32(resourceHash));
                                solution[var.Name] = resource;

                                int    nodeHash     = dataReader.GetInt32(col + 1);
                                char   nodeType     = dataReader.GetChar(col + 2);
                                string lexicalValue = dataReader.GetString(col + 3);
                                object rawSubValue  = dataReader.GetValue(col + 4);
                                string subValue     = null;
                                if (!rawSubValue.Equals(DBNull.Value))
                                {
                                    subValue = (string)rawSubValue;
                                }

                                GraphMember node = null;
                                switch (nodeType)
                                {
                                case 'u':
                                    node = new UriRef(lexicalValue);
                                    break;

                                case 'b':
                                    node = new BlankNode(nodeHash);
                                    break;

                                case 'p':
                                    node = new PlainLiteral(lexicalValue, subValue);
                                    break;

                                case 't':
                                    node = new TypedLiteral(lexicalValue, subValue);
                                    break;
                                }

                                solution.SetNode(var.Name, node);
                            }
                            col += 5;
                        }
                        solutions.Add(solution);
                    }
                }
                catch (MySqlException e) {
                    throw new ApplicationException("Error executing '" + itsQuerySql + "' for query " + itsQuery, e);
                }
                finally {
                    if (null != dataReader)
                    {
                        dataReader.Close();
                    }
                }
            }

            itsSolutions = solutions.GetEnumerator();
        }