Valid Uses for the View ParametersID: Q136940 The information in this article applies to:
SUMMARYThis article explains how to use the "?" character to build a parameterized view. In particular, it addresses the issue of the location of the "?" in the WHERE clause, and of using macro substitution with parameterized views.
MORE INFORMATIONView parameters provide a mechanism for value substitution, not macro substitution. In the View Designer, you can specify parameters on the right side of the WHERE clause (and the HAVING clause). However, parameters are still legal on the left side of the WHERE clause. Both of the following commands create a valid parameterized SQL view:
In both cases, when the VIEWNAME view is opened, the user is prompted for a
value for PARAM1, which is then used in the WHERE clause.
An example of macro substitution in the left side of the clause would be if the following view allowed the user to supply a field name for FIELDPARAM rather than just a value.
Although this is a valid view, the effect is to compare the value entered
for ?FIELDPARAM with that entered for PARAM1 for all records. The macro
substitution does not occur.
Additional reference words: 3.00 VFoxWin question mark parameterized view database KBCategory: kbprg KBSubcategory: FxprgSql |
Last Reviewed: September 20, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |