Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the SQL property of a View on the fly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00283275
Message ID:
00283438
Vues:
16
>Wayne:
>
>SQL property is readonly. The only way I found to do it during runtime, is to drop it from the dbc and recreate it. I use the code from GENDBC to make a prg that I can pass the new SQL string.
>
>It would be nice to be able to change it on the fly, then issue requery().
>
>Charlie

Why not make it param driven where you build the text strings via form then requery()

Here is a valid view with test added so as not to screw my system

CREATE SQL VIEW "LV_MASTER2_test" ;
AS SELECT * FROM f:\pro30\custom\master2 ;
where sodate >= date()-15

Here is the split up of the above

mpar1='SELECT * FROM f:\pro30\custom\master2 ;
where sodate >= date()-15'

CREATE SQL VIEW "LV_MASTER2_test" ;
AS &mpar1

Now you can change what ever mpar1 is to fit your needs.

This is what the views SQL shows in eView :
SELECT * FROM f:\pro30\custom\master2 where sodate >= date()-15

Downside to this is the fact that the DBC will bloat!

__Stephen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform