How to use TQuery
Posted on 1997-07-27
Before I get into details, these are the three questions I want answered;
1 How do I link a Query to DB controls, ie DBText, Combo, grid, etc?
2 How do I pass variables/parameters to the Query? I would want to pass values from various non-DB controls -text, combo, etc.
3 How do I execute this query once it receives its values and displays its results - in another form? I would want to start the query from a button.
I want the user to filter thier view by entering values in various controls (not DB controls) on one form and see the results in another. What ever values they enter the calling form's controls should be used in the Query and displayed in the results form. I only want values in the calling form that are NOT blank to be passed to the Query. I am not using a datamodule, however, the tables, datasource and controls are on the results form. I'm using D2 on Paradox tables. Note: I also want to do field comparisions in the Query, like Field 1 > Field 2 - or - >= (some value) and <= (some value).