In my criteria find it works find but I must say in my instructions the string is "Carrier='SpeedyAir',Origin='SFO'" but what I do is populate my comboBoxes origin and destination with all origin and destination not allowing duplicates. In my CriteriaFind I pass a string such as below: String criteria = new String(origin+","+destination); although its not the same but it works find I use the StringTokenizer an it works find but I dont have = as others have talked about "Carrier='SpeedyAir',Origin='SFO'" Suns Example "origin+","+destination" my example I dont search airlines specifically just origin and destination... Is this OK?? Thanks Lisa
Joined: Dec 18, 2000
Lisa, the specification mentions the format in which you have to pass the query string to criteriaFind method. Why would you want to change that ? Your approach may work but in my opinion you should not change the format of the query string unless you have a very good reason to do so. Deb
Joined: Feb 28, 2001
I can appreciate that, should I hardcode the fields in then parse it with the String Tokenizer class???
Such as "Origin='FRA',Destination='SFO'" Thanks Lisa
Joined: Dec 27, 2000
Lisa, In your criteriaFind() method, you can use two StringTokenizer to break down the criteria into a whole bunch of key/value pair like Origin/SFO. You can then store those pairs in a vector or arraylist, and then pass it to your find() method for a linear search. Rudy