Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create an SQL view in a prg
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00105076
Message ID:
00105083
Views:
28
Sylvia,

Views do reside in a DBC. To create a view, use CREATE SQL VIEW. Once you've created it, you can set properties for the view and its fields using DBSETPROP().

>I need to create a view for a grid which joins 4 tables. In looking at other threads on the topic, I realize I have to do this outside of the view designer. The recommendation was to cut and paste the SQL code created from the view designer and modify it to fix the way the joins work and put it in a prg or a class. I understand that for the SQL part, but I'm still not sure how to code the rest of the view outside of the DBC, that is, the other parts which create the rest of the definition so I can use this in my grid as I would something I created in the view designer. I thought views had to reside within the DBC. Perhaps I'm thinking this is more complicated than it is, but I would appreciate if someone who does this can give me an example.
Previous
Reply
Map
View

Click here to load this message in the networking platform