Error connecting to database in getSearches