Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problematic view
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00142866
Message ID:
00142882
Views:
23
Bud,

Didn't actually try it, but you had 2 instances of test!child2 instead of one of each.

The VD is pretty limited in the views it can create/modify. This is one where you'll just have to use CREATE SQL VIEW and do it in code.

>Try this in VFP.
>
>********************************************************
>create database test
>
>create table parent ;
> ( parentpk I, ;
> parentname c(30), ;
> child1fk I, ;
> child2fk I)
>
>create table child1 ;
> (child1pk I, ;
> child1name c(30))
>
>create table child2 ;
> (child2pk I, ;
> child2name c(30), ;
> child1fk I)
>
>
>create SQL view v_parent as;
>SELECT parent.*, child1.child1name, child2.child2name ;
> FROM test!parent INNER JOIN test!child2 ;
> INNER JOIN test!child2 ;
> ON parent.child2fk = child2.child2pk ;
> ON parent.child1fk = child1.child1pk ;
> WHERE parent.parentpk = ?lnparentpk
>
>* will request a view parameter, enter any numeric value
>use v_parent
>
>browse && notice the child1name field
>
>modi view v_parent
>********************************************************
>
>Now, why does the browse return that weird field name and why can't you modify the view?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform