Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Custom View Parameter?
Message
De
08/09/2008 14:49:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/09/2008 14:30:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01345719
Message ID:
01345876
Vues:
17
>>>Ok, if I do the line:
>>>
>>>vp_studentRule = [( Student.cid <> 'ZZZZZZ')]
>>>
>>>in the command window before validating, the DBC validates without error.
>>>So, where does this need to be defined, if adding the line to the top of the view PRG is not working?
>>>Thanks for your continued help,
>>>Amanda
>>
>>I have the impression that you forgot the question mark for the view parameter, which should look like "?vp_studentRule = ...".
>
>
>Not if you set them prior to using/requerying a view

I was talking about the view definition. If you forget a question mark, you may have trouble opening the view, even if it be only for modifying it. Or, as in this case, with a validate database - which may be related to the missing question mark.

Now, for opening the view - yes, before using a parameterized view, you need to define the variable - otherwise, Visual FoxPro will put an ugly prompt for the missing parameter. Ugly, because the programmer has no way of controlling it, like, give a meaningful title. So, the only option for the programmer is simply to assign a variable to the parameter before opening or requerying the view. Not sure about use ... nodata - logically, it would seem that no variable is required there.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform