GetHighestGrid converted to QueryDatabase