Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can the View Designer do this?
Message
From
27/04/2002 10:10:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/04/2002 01:18:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00649937
Message ID:
00649974
Views:
19
>I have a table with FKs in it.
>I need an updateable view that has fields from the "parent" tables in it. Only 1 table needs to be updateable, the rest of the tables are just for display.
>
>I have no problem doing:
>
>select a.Fields, b.Field1, c.Field2 ;
>  from a, b, c ;
>  where a.FK1 = b.PK ;
>    and a.FK2 = c.PK
>
>but when I try to create it in the View Designer, sometimes I'll get c.Field2 and sometimes not. Sometimes it'll work for a while, but then I'll try to add a third FK and then lose c.Field2.
>
>I really need to get 5 FKs to pull their respective fields into the View (2 from table b, 2 from table c, and 1 from table d).
>
>TIA

Bill,
I'm not sure view designer could handle it. I'd design it w/o designer < g >
Try to use 'join' instead of old style joins.
* create sql view myView as ;

select a.Fields, b.Field1, c.Field2 ;
  from force ;
     Table1 a ;
     inner join Table2 b on a.FK1 = b.PK ;
     inner join Table3 c on a.FK2 = c.PK
'Force' clause not only forces the connections made in that order but prevents the view to be opened and possibly screwed by the designer.
You'd need manually adding update properties. Use gendbc to create a regular view to check how it writes. Adopt to your code and run to create your view.
Alternatively you could use Erik Moore's eview utility I think.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform