Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define not available in select ?
Message
 
 
To
05/01/2004 17:14:54
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00864034
Message ID:
00864079
Views:
12
Bill,

This error has nothing to do with #DEFINE. VFP parser thinks that _VFP is a table name. The following code shows that.
CREATE CURSOR temp (fld1 i, fld2 C(20))
INSERT INTO temp VALUES(1, "A")
SELECT fld1, _VFP.StartMode AS sm ;
	FROM temp
* However this one works
SELECT fld1, EVALUATE("_VFP.StartMode") AS sm ;
	FROM temp
>I'm using VFP 7.0
>
>In my include file I have:
>#DEFINE _DV ( VERSION( 2 ) = 2 and _VFP.STARTMODE = 0 )
>
>then in a method() I have:
>select ..... ,IIF( ! _DV OR EMPTY( cl_Flag ) ,' ' ,TRANSFORM( cl_Flag) ) .....
>
>I keep getting an error "column startmode is not found"
>
>
>So I changed it to:
>llDV = _DV
>select ..... ,IIF( ! llDV OR EMPTY( cl_Flag ) ,' ' ,TRANSFORM( cl_Flag) ) .....
>and it works fine.
>
>Is there some good reason that I can't use a Defined variable in a Select.... ?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform