Can the String I pass to the criteria Find method be in this fashion - "Origin airport = 'SFO', Destination airport = 'DEN'"; Why is there a neccessity to use Carrier since the user gets the option to choose only the Origin & Destination from the UI. Also can I get the 'Origin airport' string & the 'destination airport' string from the database instead of hard coding it? Please reply, poornima.
The idea is to have the Data class be a usable database for different applications. For example, if I was making a clothing inventory system I'd want to be able to pass in something like "Color='Blue'". In order for the search to be successful, you have to be able to match the query columns with something that exists in the database schema (as defined in the FieldInfo, description)
posted 19 years ago
Thanks for the reply Matt, Can u please clear this for me - If my task now is to match the String in the query column with the values in the database, first I get the String in the Query column,then with what String do I concatenate this with? The Query column might be a String representing Origin,or Destination or carrier,or anything else.
Hi Poornima In your comment, "If my task now is to match the String in the query column with the values in the database, first I get the String in the Query column, then with what String do I concatenate this with?" Why are you concatenating?, did I missed what you are trying to say? A criterion represents the matching criteria for single record. Your query string represents tokens of <Column name>=< 'value' >. Parse these tokens to separate the column names and its value. Next compare the column value with corresponding DB record column value. A suggestion is, you can implement a method in the record (DataInfo) object to get the value of a column by passing the column name as an argument. This helps you to sort out the matching records easily. May be this will help. [This message has been edited by SMK Reddy (edited June 17, 2001).] [This message has been edited by SMK Reddy (edited June 17, 2001).]
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!