Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Issue: CAST to V a eval expression fire a error
Message
From
10/04/2005 13:38:25
 
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:
01003219
Views:
17
>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.

Sure ? With this logic you cannot define a index for a VARCHAR field!
But you can:
CLEAR
CREATE CURSOR BYBYBUG (AB V(200) NOT NULL)
INSERT INTO BYBYBUG VALUES ('')
* THESE TAGS MUST TO HAVE THE SAME STRUCTURE
INDEX ON AB TAG T1
SET EXACT ON
? KEY(),KEYMATCH('')
INDEX ON CAST('' AS V(200)) TAG T12
? KEY(),KEYMATCH('')
X1=['']
INDEX ON CAST(&X1 AS V(200)) TAG T13
? KEY(),KEYMATCH('')
>Anyway, where would you use such weird index key expressions in real life applications?

In my application. Weird is a statistic concept!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform