Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To get the view parameter in the view result
Message
De
14/04/2015 10:20:25
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
14/04/2015 10:17:58
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:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01618350
Message ID:
01618388
Vues:
23
>>>>>You could include the parameter in the view ( in this case)
>>>>>
>>>>>select Table.*, ;
>>>>> cast ( ?lnYear as Int ) as MyParam;
>>>>> from ....
>>>>> where (YEAR( DATEFIELD ) >= ?lnYear )
>>>>
>>>>Using this code I get an error "SQL: Column 'lnYear' is not found."
>>>>
>>>>Any idea what I do wrong?
>>>>
>>>>TIA
>>>>Gerhard
>>>
>>>
>>>Works fine over here - providing you assign a value to lnyear
>>>
>>>
>>>lnyear = 2000
>>>select dossier.*, ;
>>> cast ( ?lnYear as Int ) as MyParam;
>>> from dossier ;
>>> where (YEAR( d_custenddate ) >= ?lnYear )
>>>
>>
>>The sense of ?Var is to interactiv input the var if not defined?
>
>OK, but I always define the parameters in code - I never use the popup asking for a value
>
>>This will work on WHERE clause only

Then there is no meaning in ?var. It's intercative or fall back, as you like it.

Inherited from times as one would work with a table from VFP commandline

Gerhard does odd things
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform