Put 'results.close()' in a try statement to catch any SQLExceptions.