Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scope
Message
 
À
21/04/2001 17:24:57
Ben Dekker
Dekker Soft & Hardware
Axel, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Scope
Divers
Thread ID:
00497534
Message ID:
00498319
Vues:
9
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform