title: How can I retrieve Firstname in my database?
body: <p>I have these codes</p>
  
  <p><code>DBCollection.java</code></p>
  
  <pre><code>public LogInHandler userGreetName()
  {
      LogInHandler login = new LogInHandler();
      String query = null;
  
      try
      {
          query = "SELECT First_Name FROM user_information WHERE Username = '"+login.getUsername()+"'";
          rs = stmt.executeQuery(query);
          rs.next();
          login.setGreetName(rs.getString("First_Name"));
      }
      catch(Exception e)
      {
          JOptionPane.showMessageDialog(null,e.toString());
      }
      return login;
  }
  </code></pre>
  
  <p>On my <code>mainWindow.java</code> I have formWindowOpened event and contains the codes</p>
  
  <pre><code>DBCollection dbc = new DBCollection();
  greetNameL.setText(dbc.userGreetName().getGreetName());
  </code></pre>
  
  <p>LogInHandler.java</p>
  
  <pre><code>public class LogInHandler extends ValidateLogin{
  DBCollection dbc = new DBCollection();
  
  private String username;
  private String greetName;
  
  
  public void setGreetName(String temp)
  {
      greetName = temp;
  }
  public String getGreetName()
  {
      return greetName;
  }
  
  public void setUsername(String temp)
  {
      username = temp;
  }
  
  public String getUsername()
  {
      return username;
  }
  </code></pre>
  
  <p>I have <code>login.setUsername(usernameTF.getText());</code> in my <code>loginWindowGUI</code></p>
  
  <p>here's my problem.. I cant retrieve the First_Name column in my database.. it displays null. and is my WHERE condition in query is correct? help please.. </p>