WEB4J - Minimalist Java Web Application Framework

Prefer PreparedStatement

PreparedStatement is usually preferred over Statement for these reasons :

In general, it seems safest to use a Statement only when the SQL is of fixed, known form, with no parameters.

See Also :
Keep SQL out of code
Would you use this technique?
Yes   No   Undecided   
Add your comment to this Topic :

© 2008 Hirondelle Systems | Source Code | Contact | License | Quotes | RSS
Individual code snippets can be used under this license - Last updated on September 6, 2008.
Over 98,000 visits last month - Built with WEB4J.
- In Memoriam : Bill Dirani -