Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View with Nodata results in error 1494 when requery
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01036132
Message ID:
01036146
Views:
14
Thank's Sergey,
You are of course right. I changed the format to
((100-(IIF(Prodgroup.lreject1,Insulators.rej_perc1,000.0)+;
IIF(Prodgroup.lreject2,Insulators.rej_perc2,000.0)+;
IIF(Prodgroup.lreject3,Insulators.rej_perc3,000.0)+;
IIF(Prodgroup.lreject2b,Insulators.rej_perc2b,000.0)))/100) AS rejectcostdivider
to avoid the field size change from value 0 to a higher value with decimals and the problem is gone.This also works in VFP8.


>Most likely the field size changes on requery. Try to wrap your expression with new CAST() function to avoid that.
>
>>I get the error 1494 "View definition has been changed" when I requery my local view. This is only a problem if I use "NODATA" when opening the view. If I remove NODATA the view works as expected.
>>
>>Use appdata!lv_ins_operations Nodata
>>Requery('lv_ins_operations')  && error 1494
>>
>>I have found out that if I take the following code out from the view definition the error goes away
>>
>>((100-(IIF(Prodgroup.lreject1,Insulators.rej_perc1,0)+;
>>IIF(Prodgroup.lreject2,Insulators.rej_perc2,0)+;
>>IIF(Prodgroup.lreject3,Insulators.rej_perc3,0)+;
>>IIF(Prodgroup.lreject2b,Insulators.rej_perc2b,0)))/100) AS rejectcostdivider
>>
>>
>>Prodgroup.lreject1,Prodgroup.lreject2,Prodgroup.lreject3,Prodgroup.lreject2b are of type logical
>>Insulators.rej_perc1,Insulators.rej_perc2,Insulators.rej_perc3,Insulators.rej_perc2b are of type numeric
>>
>>
>>Anybody knowing the reason?
/Torgny
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform