QueryRun.prompt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Presents, to the user, the options for defining the records to be fetched by the query.
public:
virtual bool prompt();
public virtual bool prompt ();
abstract member prompt : unit -> bool
override this.prompt : unit -> bool
Public Overridable Function prompt () As Boolean
Returns
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.
The following example demonstrates the prompt method.
{
QueryRun qr;
// ...
if (qr.prompt())
{
// The user pressed OK. Go ahead and do whatever is required.
}
else
{
// The user pressed Cancel.
}
}