Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local view error
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00268089
Message ID:
00268644
Views:
24
<snip>

>Has VFP already determined the width of the columns if the view is set to
NoDataOnLoad = .T. before REQUERY() is run?
>
>If the nField is numeric, how to define the width?
>
>I've used the same IIF expression in another view, it works fine. Why?
>
>My IIF expression is:
>
>IIF(nX = 1, nField1, nField1 * IIF(nX = 2, 1, nField2)/12)
>
>Field Type is : nField1 - N(5), nField2 - N(4)
>
>Is that OK?

VFP determines the column information when the view is opened. If NoDataOnLoad is .T., blank data is used.

I think your problem is with the second expression in the IIF. Since you are dividing by 12, the result may have decimal places. If nX = 1, the result will be an integer. That will cause the problem.

I don't know what the calculation is trying to accomplish but you might try use the ROUND or INT functions on the second expression.
Steve Ruhl
CitiMortgage, Inc.
steven.ruhl@citibank.com Office
Steve@steven-ruhl.com Home
Previous
Reply
Map
View

Click here to load this message in the networking platform