Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Issue: CAST to V a eval expression fire a error
Message
 
 
To
09/04/2005 06:25:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01003005
Message ID:
01003216
Views:
13
Hi Fabio,

The error is correct because index key expression creates zero-length key. The CAST(&X1 AS V(200)) should also generate this error.
Anyway, where would you use such weird index key expressions in real life applications?

>
>CLEAR
>SET NULL ON
>CREATE CURSOR BYBYBUG (AB M NOT NULL)
>X1="''"
>? EVALUATE([&X1])==&X1  && are fully equal
>INDEX ON CAST(&X1 AS C(200))	TAG T2                  && no error
>INDEX ON CAST(&X1 AS V(200))	TAG T2V                 && no error
>INDEX ON CAST(EVALUATE([&X1]) AS C(200))	TAG T3  && no error
>INDEX ON CAST(EVALUATE([&X1]) AS V(200))	TAG T3V	&& FIRE A ERROR, DON'T SHOULD
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform