I am creating a search engine for my database. I have JCheckBoxes that enable/diable JTextFields and/or JComboBoxes. I need to build a query based on what the user has selected and what has been typed in the textFields. Right now, there are a huge amount of IF statements in my code. But I was wondering if anyone knows a better, more dynamic way to build a query based on what I have told you. Thanks for any help.
martin samm
Ranch Hand
Joined: Nov 09, 2000
Posts: 31
posted
0
how about trying regexp (IBM's regexp4j or Apaches jakarta-oro)? Create a full query string with placeholders and perform search/replace with the data you receive. I have to admit i haven't tried this, but it sounds feasible.
martin samm<BR>m_sam@rroom.net
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.