Talk:Monitoring downloads
From MDC
There are a few issues with this article, and I don't quite have time to fix them, so I'll post them in hopes that someone else will have more time:
- The database connection should probably just be held as a member variable to the class. Closing it (which should actually be in a try-catch block because it can fail - especially on windows) and opening it each time adds a lot of overhead.
- Anywhere createStatement is used, preparing and executing the statement should be wrapped in a try-catch block, with a finally that reset's the statement (and finalize it if you want to actually close the db still).
I'm aware that the docs for storage aren't all that great about this either - I plan on updating those soon as well. -Comrade693