I am having trouble declaring an enumeration for DB field types that I can use across all functions of a particular class. With the following code I get "cannot resolve USERNAME to a variable type":
public class SQL_access {
public enum DBfields { BLANK, USERNAME, ID, PASSWORD, FIRSTNAME, LASTNAME };
public boolean loginValidate( String username, String password ){
String DBuser, DBpass;
PreparedStatement table = connectToTable( "firstsql", "users");
ResultSet row = table.executeQuery();;
while(row.next()){
DBuser = row.getString(USERNAME);
if(DBuser.equals(username)){
DBpass = row.getString(PASSWORD);
break;
}
}
}
};