Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why view breaks whenever I change table structure?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00391898
Message ID:
00392062
Views:
11
The problem is the * in the select statement for your view.

I add a logical field FLAG to the end of all end of all my tables. In view designer, I select all the fields except for FLAG. This creates a SQL statement that specifies each field.

Then when you add a field to the table, you just have to go into view designer and select it. When you remove a field, you have to remove it from the view first.



>Hi,
>
>This is a gripe I've been having forever.
>
>I have a view that's based on "select * from mytable".
>
>Why do I have to update this view every time I add a new field to mytable or make some other structural change?
>
>I know it has to do with the "updateability" of the view, but if I have all the fields selected and then all of them are also marked updateable, it would be quite nice if vfp would assume that yes, this new field I'm adding today shall be updateable as well.
>
>Now I have to go through every view that references mytable and fix it, which brings me to my next question:
>
>Is there any way to bring up a list or something showing all the views that include a particular table? For example, right now it would be nice to be able to list all the views that have been affected by the addition of a new field in mytable.dbf rather than wait for one of my forms to fail in order to "aha! There you are..."
>
>Thanks!
>
>Alex
Darren Young
Previous
Reply
Map
View

Click here to load this message in the networking platform