You're opening database connection and not closing it. Will it not make problems?