Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL View from view designer
Message
From
02/06/1998 03:39:46
 
 
To
01/06/1998 22:20:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00101710
Message ID:
00103898
Views:
27
>Hi Andrea,
>
>Thanks for jumping in!
>
>I am using six different parameterized views on six forms. These views are used in navigational grids. The PK of the selected record is used to requery the updatable view. The same updatable view is used in all six forms.
>
>I think it is because of the fact that I am using different parameters on each of the six forms in the navigational grids, that I need the second view. To me, this is keeping it simple.

Whoa ! Well, if I've understood you right, as long as you need to fetch different data-sets from the same table for sifferent purposes it's ok to have different views, because the only thing that they've in common is the main updatable table and not the parameters...
Anyway, if you're using the *same* updatable view in all six forms, be sure to have a default data session or you'll have to requery it each time...

>These forms are working quite nicely at this time, thanks to Steve's pointer on using the sequential join syntax for the updatable view.

Yes, I've discovered the trick only two or three days before Steve's message, and now everything works well. If you accept another suggestion, look for the gendbc.prg program in the tools folder of VFP. It gives you the code for your entire database, including views, and could be very useful to generate .prg(s) for complex views. Just build an updatable view with no more than two joined tables, and adjust every parameter like default values, rules and so on. Then run gendbc.prg and you'll have the code skeleton to make a more complex one....

HTH,
Sincerely,

Andrea Brajuka
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform