Unable to retrieve data from existing database