Query by Example

DX builds powerful QBE-capabilities into every Data Presentation widget.

It's easy to use QBE, either in Play Mode or while running the application. Simply type in the value you want to search for in any field. Click the "Search" button, and DX automatically retrieves all matching records. Use the arrow keys to review each match. Click the "Stop" button, and the field reverts to its initial setting.

DBPak resource settings make it easy to fine-tune QBE operations or turn them off completely. By modifying QBE resource settings you can create widgets that perform:

  • pattern matching searches ('like', 'contains', 'begins with', 'ends with', etc.)
  • relational searches ('greater than', 'less than', 'greater or equal to', 'not equal to', 'exact match', etc.)
  • user-defined searches that allow the user to type in their own relational operators (<,>,...) or SQL wildcards (% and _).

QBE behavior is controlled by one resource on the Query widget and several resources on Data Presentation widgets.

Within the Query widget:

  • XmNallowQueryByExample turns QBE capability on or off for all the Data Presentation Widgets controlled by the Query.

Within Data Presentation widgets:

  • XmNuseInQBE -- indicates whether or not the widget's value should be used to filter retrieved data.
  • XmNqbeStyle -- determines the look and feel of the widget when in QBE mode.
  • XmNqbeValueString -- sets the default value for a Data Presentation widget when entering QBE mode.
  • XmNqbeOperator -- controls QBE operands. Over 30 choices are available, providing developers with a wide range of relational, pattern-matching and user-defined QBE operations.

Additional Resources:

  • Refer to Query By Example in DX HyperHelp.

Documentation: