Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
1494 Error When Requerying View Based on Select...Union
Message
From
27/11/2002 15:54:56
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00727413
Message ID:
00727759
Views:
8
Hi Jeff,

Can you send me or post the structure of the source table(s) for the view and the view code itself?


>Thanks for your response.
>
>After further investigation, I have discovered that the problem lies within the dataenvironment of the form. What's happening is VFP8 is not applying it's precedence rules to the view when opened with NoDataOnLoade = .T. If I open the view with NoDataOnLoad = .T., I observe the following:
>
>1. DISPLAY STRUCTURE shows column 2 of the view is of type INTEGER.
>2. If I REQUERY() the view I get a 1494 - View has changed error.
>
>
>However, if I change the NoDataOnLoad property to .F. and open the view, I observe the following:
>
>1. DISPLAY STRUCTURE shows column 2 of the view to be of type NUMERIC w/ 2 decimals.
>2. If I REQUERY() the view, no problem.
>
>This view is based on a SELECT...UNION and column 2 of table 1 of the union evaluates to INTEGER but column 2 of table 2 evaluates to NUMERIC w/ 2 decimals. What appears to be happening is with NoDataOnLoad = .T., column is 2 of the view is defined as INTEGER but according to the precedence rules should be NUMERIC. So, the column 2 data returned from REQUERY() is of type NUMERIC leading VFP to think the view structure has changed resulting in a 1494 error.
>
>Again, what's happening is VFP is not applying it's precedence rules to the view when opened with NoDataOnLoade = .T. If it were, column 2 of the view would have defaulted to NUMERIC, since it takes precedence over INTEGER, and I would not be getting a 1494 error.
>
>Jeff
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform