Progress
Language Tutorial
for Windows


Selecting with the USING Option

The USING option allows you to match a screen value for a database field with records that have that value. In this example, the new query will build a results list of Customer records that have the same postal code as the current screen value of Postal-Code:

OPEN QUERY My-Query FOR EACH Customer USING Postal-Code. 

In this example, the new query will build a results list of Customer records that have the same postal code and the same country name as the current screen value of Postal-Code and Country:

OPEN QUERY My-Query FOR EACH Customer USING Country AND Postal-Code. 

The examples assume that a user has entered a value for Postal-Code and Country. Progress attempts to match these values to database records.

You can code similar functionality by prompting the user to enter a value into a variable, then using that variable in a WHERE clause, as shown below:

OPEN QUERY My-Query FOR EACH Customer WHERE Cust-Num = My-Variable. 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095