I have this method to load the objects, however when I am running the sql code it is giving me a Syntax error.

```
public void loadObjects() {
    Statement s = setConnection();

    // Add Administrators
    try {
        ResultSet r = s.executeQuery("SELECT * FROM Administrator;");
        while (r.next()) {
            Administrator getUser = new Administrator();
            getUser.ID = r.getString(2);

            ResultSet r2 = s.executeQuery("SELECT * FROM Userx WHERE ID= {" + getUser.ID + "};");
            getUser.name = r2.getString(2);
            getUser.surname = r2.getString(3);
            getUser.PIN = r2.getLong(4);

            JBDeveloping.users.administrators.add(getUser);
        }
    } catch (Exception e) {
        System.out.println(e);
    }

}

```

I have tried inserting the curly braces as stated in other questions, but I am either doing it wrong or it doesn't work. 
This method should be able to load all administrators but I believe it is only inserting half of the ID.
The ID that it gets, consists of numbers and char; example "26315G"

the Error - 
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '26315'.

Edit -

```
private java.sql.Connection setConnection(){
    java.sql.Connection con = null;
    try {
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        String url = "jdbc:sqlserver://" + host + ";DatabaseName=" + database + ";integratedSecurity=true;";
        con = DriverManager.getConnection(url, username, password);
    } catch(Exception e) {
        System.out.println(e);
    }
    return con;
}

public void loadObjects() {
    java.sql.Connection con = setConnection();

    // Add Administrators
    try {
        PreparedStatement sql = con.prepareStatement("SELECT * FROM Administrator");
        ResultSet rs = sql.executeQuery();
        while (rs.next()) {
            Administrator getUser = new Administrator();
            getUser.ID = rs.getString(2);

            PreparedStatement sql2 = con.prepareStatement("SELECT * FROM Userx WHERE ID=?");
            sql2.setString(1, getUser.ID);
            ResultSet r2 = sql2.executeQuery();

            getUser.name = r2.getString(2);
            getUser.surname = r2.getString(3);
            getUser.PIN = r2.getLong(4);

            JBDeveloping.users.administrators.add(getUser);
        }
    } catch (Exception e) {
        System.out.println(e);
    }

}

```