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
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--