Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scope
Message
 
To
21/04/2001 17:24:57
Ben Dekker
Dekker Soft & Hardware
Axel, Netherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Scope
Miscellaneous
Thread ID:
00497534
Message ID:
00498319
Views:
11
>Hi Cy
>
>>
>>FUNCTION SCOPE (cDbf,cField,xStart,xEnd)
>>LOCAL lcFilterString
>>SELECT (cDbf)
>>DO CASE
>>
>>   CASE TYPE("xStart") = "D"
>>      lcFilterString = "set filter to between("+cField+",{"+DTOC(xStart)+"},{"+DTOC(xEnd)+"})"
>>   CASE TYPE("xStart") = "C"
>>      lcFilterString = "set filter to between("+cField+",'"+xStart+"','"+xEnd+"')"
>>   CASE TYPE("xStart") = "N" OR TYPE("xStart") = "I"
>>      lcFilterString = "set filter to between("+cField+","+xStart+","+xEnd+")"
>>ENDCASE
>>*-- Set the filter on selected table
>>&lcFilterString
>>ENDFUNC
>>
>
>
>When i use scope("Year","date","01-04-2001","30-04-2001")
>
>I've got an error "operator/operand type mismatch"
>on &lcFilterstring

You would. You are trying to compare a date field with character data.
Cy Welch
Senior Programmer/Analyst
MetSYS Inc
Previous
Reply
Map
View

Click here to load this message in the networking platform