Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling view designer - a little tip
Message
De
24/12/1999 18:20:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Disabling view designer - a little tip
Divers
Thread ID:
00308463
Message ID:
00308463
Vues:
48
I came across a situation where I created my view programmatically and it was performing just as I want. BUT whenever the "view designer" is used to modify it was screwed.
Since I should protect usage of "view designer" for this particular views I had to find a way. Here is what I did :
I included a dummy subquery :)
create sql view myView as ;
  select ... from table1 left join table2 on .... ;
      left join table3 on .... ;
      where .... ;
    <b>and table1.pk in (select pk from table1)</b>
This causes the designer to complain "SQL is too complex" and it doesn't open it at all. Query definition is left intact in DBC :)
Of course for the sake of performance subquery could be made from a dummy one record table (iPK, cPK fields holding impossible values for integer and char generated PKs) :
...where myTable.PK not in (select iPK from Dummy)
Hope this helps to you too :)
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform