Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in View Designer?
Message
From
13/10/1998 11:43:58
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00146260
Message ID:
00146278
Views:
25
>I'm working in VFP5.0a SP3 on NT 4.0. When I create a view - parent and two or three children - and browse the view, everything works fine. If I close the view, I get an error message saying "SQL: Column x_index not found", where x_index is the column linking parent and child tables. It is always the last link in the SQL statement which is named in the error message. If I save the view first, then close it, all seems fine until I attempt to modify the view, at which point the same error message appears, as well as having all links and field selection for the view dissapear. Inner, outer joins make no difference. Is this a bug or am I setting up the columns incorrectly? Since the view works if I save first, then close, and since it seems to work correctly, sometimes, as the basis of a report generated from that view, I'm thinking it's a bug, or that at the least it's 'designed behavior'. Does anyone know for sure, and in any case I'd like some workarounds/fixes, if possible. Thanks!

This is an acknowledged bug. But the bug is in the view designer, not with views themselves in VFP. If you want to create views with more than one or two joins, you need to do them in code with:

CREATE SQL VIEW myView AS;
SELE blah, blah, blah.

You only need to run view definition code once (you could do it in the command window) for the view to live persistently in the dbc.

This is all very simple until you want to create complex updateable views. to do this, create the view initially with the above syntax, and then run gendbc (or my genview utility available here in the files section) to get a full programmatic listing of the code to build the view. Look at the DBGETPROP commands carefully to look and see which ones to change to make your view updateable. Good luck.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform