Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can the View Designer do this?
Message
De
27/04/2002 10:10:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/04/2002 01:18:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00649937
Message ID:
00649974
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform