Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating view programmatically
Message
De
23/10/2001 11:41:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/10/2001 11:33:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00572083
Message ID:
00572088
Vues:
28
This message has been marked as a message which has helped to the initial question of the thread.
>I am considering creating view programatically, instead of saving the definitions in the database. I am not (currently) asking how to do it; I will try to figure it out from the help, first.
>
>I think I may gain some flexibility, like having several slightly different versions of a view (say, with different parameters).
>
>What I do want to ask is:
>
>1) Is it very complicated to create views programatically?
>
>2) Is it worth the trouble? That is, perhaps there are too many problems involved, or perhaps there are better ways to do it.
>
>TIA, Hilmar.

1) No it's easy :)
2) Yes for sure :)

You didn't ask this part :

select ... into cursor myCursor

Strip 'into cursor myCursor' clause and add :
create SQL view <ViewName> as select ...

To create the view. IOW test your SQL first then make it a view.

Create a view in designer first and set its updatable properties. Then run gendbc to get programmatic version of DBC. You could examine extra settings for SendUpdates, KeyFields etc.

And neverthless to say use Evan's 'Eview'.

PS: Placing a 'force' clause make a view 'unopenable' by designer protecting it from spoiling.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform