• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

A question about criteriaFind metod

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
In my instruction, the paramater for criteriaFind is a string which should contain Carrier and Origin, for example "Carrier='SpeedyAir',Origin='SFO'" ,now question is :Can I add Destination Flied ( that makes more sense to book a flight) in my string ??
Thanks
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I allow filtering on any combination of the field names. My filter dialog gets a list of the valid field names and creates a dialog (grid) with the names of the fields on the left and an entry field on the right. On exit, a collection is created that has the field names as keys and the filtering criteria as the value (only fields with data entered are included). A helper method converts the collection to a string and passes that to the criteriaFind() method.
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sam,
My criteriaFind method was a generic search method. It takes any combination of name=value pairs, not just specific to FBN. This way it can be used for any database that the Data class can read. In my GUI, I enabled the user to search by either Destination, Origin or Carrier.
Mike
 
Sam Stackly
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Guys for reply ,
Creating a generic method like Mike mentioned is the point I was looking for. Thanks again.
Sam
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic