Re: Table for FlexiFields, Base table fields have been chang

Author: Ed Leafe

Posted: 2004-03-31 at 14:06:24

Quote: >>5) Later this table can have any practical number of fields

of valid types (generally Char,VarChar,Int, Date, Double), but which

and how many fields depends on the users requirements

[snip]

12) The question is how to tackle this problem of base table fields

having changed?

Fox will not let you do this when you define a view as SELECT *

instead of naming field individually. When you define a view with

SELECT *, Fox grabs the current table structure, and sets its DBC

properties for the columns based on that structure. If the structure

changes, when Fox does a SELECT * on the new structure, there are now

columns that it doesn't know how to handle, and as a result will throw

the error you are seeing.

The only solution (short of a redesign of your data) would be to use a

temporary DBC, and create the view on the fly. This way, Fox will grab

the current structure to define the view. See the code in

cDistinctDynamicViewCursor for samples on how to do this.

©2004 Ed Leafe