Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View Definition has changed
Message
From
24/11/1998 22:08:59
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00160954
Message ID:
00161231
Views:
18
>Occasionally after updating a view I will get this curious error stating to me that the "View Definition Has Changed" when I try to REQUERY the view. This is sort of odd in that all I am doing is updating the data in the view/tables. As I trap the definition change using GetNextModified, I normally will detect the view change and can TableRevert(.T.) to get it back. On this particular occasion not only does it not detect the view change, but when I do an outright TableRevert it does not restore the view definition. All I can do is close the view and reopen it. But this causes other problems. My question is this: Why do I get a view definition change when I am updating data? The error indicates some sort of structural change to the view and nothing to do with the data. But I am not chnaging the view definition.

Do you have an ALLTRIM in the view definition? Is this view based on another view? These are the two situations that I have seen cause this problem.
The first happens when VFP decides the column width for the column in question based on the results of one REQUERY(). If all the records in the first cursor fall under 5 characters, for instance, but the second result set contains longer string, then the cursor definition changes.

A similar thing happens with views based on views. The view decides when it is requeried how wide its columns will be based on width of the columns in the underlying view. When those column widths change, you change the view definition.

If neither of these pegs your problem, then look for similar situations and I am confident you will track this problem down.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform