Use the connection pool.

The code is much simpler, cleaner, and easier to understand.