I store all of my sql statements in a properties file and use ? for replacement parameters into PreparedStatement objects. That way I can support many databases by swapping in a different properties file. Even if you only need to support 1 database it's still useful because you don't need to recompile to change sql.

There is a Mapper project in the commons-sandbox that supports this.

I should also mention that Mapper also makes it trivially easy to pass in a collection of objects to fill the ? sql parameters. If you use Mapper, please send me feedback :-).


David

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to