Share via


QueryRun.prompt Method

Presents, to the user, the options for defining the records to be fetched by the query.

Syntax

public boolean prompt()

Run On

Called

Return Value

Type: boolean
true if the user clicked OK and the search is to continue; false if the user clicked Cancel to stop the search.

Remarks

The user is presented with a form to give ranges that define constraints to be fulfilled by the fetched records. Or the user may add new fields to delimit, change the sorting, and so on.

This method can be overloaded to prompt the user in an application-defined way instead of in through the predefined query form. Or this method can be overloaded to avoid giving the user control over which records are fetched. To produce these results, do not call the inherited method. In any case, the function should return true if the query is to continue, and false otherwise.

Examples

{ 
    QueryRun qr; 
    // ... 
    if (qr.prompt()) 
    { 
        // The user pressed OK. Go ahead and do whatever is required. 
    } 
    else 
    { 
        // The user pressed Cancel. 
    } 
}

See Also

Reference

QueryRun Class