public static Question getQuestionData(int QDbId)
    {
        try 
        {
        Question q = new Question();
        String qstatement = String.format("Select * from question where questionid = %d", QDbId);
        ResultSet qrs = getQueryResults(qstatement);
        if (qrs.next())
        {
          q.questionText = qrs.getString("QuestionText");
          q.dbId = qrs.getInt("QuestionID");
          q.AuthorId = qrs.getInt("AuthorID");
          q.isValidated = qrs.getBoolean("ISVALIDATED");
          q.isRejected = qrs.getBoolean("ISREJECTED");
        }
        
        String astatement = String.format("Select * from questionanswer where questionid = %d", QDbId);
        ResultSet ars = getQueryResults(astatement);
        while(ars.next())
        {
            String atext = ars.getString("ANSWERTEXT");
            boolean IsCorrect = ars.getBoolean("ISCORRECT");
            int AnswerId = ars.getInt("ANSWERID");
            q.answers.add(new Answer(atext, IsCorrect, AnswerId));
        }
        return q;
        
        }
        catch (SQLException ex)
        {
            return null;
        }
        catch (Exception e)
        {
            return null;
        }
        
    }