Re: is there a better way of creating SQL queries from form objects ?

2005-05-10 Thread Sean Burlington
Erik Weber wrote: As far as the implementation goes, there is no reason to be scared of switches and loops. (But favor polymorphism/virtual functions over a giant loop.) However, you should get rid of all those concat operators and use StringBuffer.append instead. The performance will improve s

Re: is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Sean Burlington
Rick Reumann wrote: Look into using iBATIS http://www.ibatis.com. It's easy to use and will handle this kind of dynamic SQL very nicel (the PDF instruction manual is nice. Look at the SQL Maps documentatoin under Dynamic Mapped Statements.) that's a bigger change in coding than I was thinking o

Re: is there a better way of creating SQL queries from form objec ts ?

2005-05-09 Thread Sean Burlington
Benedict, Paul C wrote: Sean, Have you thought about constructing a DAO/Adapater object that receives your input, and then does the notorious SQL-string building on the inside? If you cannot get the elegant solution, you should at least make it appear elegant by wrapping it inside of the DAO layer.

is there a better way of creating SQL queries from form objects ?

2005-05-09 Thread Sean Burlington
Hi all, this is such a common problem that I'm sure there must be loads of advice on how to deal with it - I just can't find it. I have a database containing many records Searches can be performed on several text fields - and refined by boolean fields. The html form thus consist of several tex