Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling view designer - a little tip
Message
From
24/12/1999 18:20:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Disabling view designer - a little tip
Miscellaneous
Thread ID:
00308463
Message ID:
00308463
Views:
49
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
Next
Reply
Map
View

Click here to load this message in the networking platform