<< October 2008 | Home | December 2008 >>

Horrible JDBC Code and What's Wrong With It

Ah, Efficiency: Thou art a goddess who deserves worship, adulation, sacrifice, but thou art also a goddess who gets said worship, adulation, and sacrifice in all the wrong ways. Here's some JDBC code validating a login, trying to be good code (I think!)... that gets it wrong in almost every way possible.

Read more...

Tags :

Are JDBC statements portable across databases?

Ah, JDBC. Sometimes, people want to write JDBC code, because SQL is friendly and safe; then they discover that they actually don't want to deploy on MySQL after all, and they run into problems. The question is usually formed in this way: "If I write my SQL in a prepared statement, is it going to work the same way in $OTHER_DATABASE?"

Read more...