Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function to return what VFP will do to my code?
Message
De
15/12/2018 12:26:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/12/2018 14:57:23
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01664494
Message ID:
01664508
Vues:
62
>Hi all,
>
>Don't even know what to search for - I thing I remember seeing a function that does this. Basically, I want to know what VFP is going to do with my code when I set a filter e.g.
>
>SET FILTER TO State = 'NY'
>
>when I query FILTER(), it returns STATE="NY"
>
>i.e. it strips out the spaces and changes my single quotes to double.
>
>Why do I need this? In one form I want to only fire the SET FILTER statement if the user has changed something. But my worked up filter string is always going to be different than what VFP returns via FILTER(). Especially something like:
>
>SET FILTER TO State = "NY" OR State = "PA"
>
>becomes this with FILTER()
>
>STATE="NY".OR.STATE="PA"
>
>I am sure I saw a function for this at one point.
>
>Albert

And really, why do you need this?
SET FILTER TO State = "NY" OR State = "PA"
SET FILTER TO STATE="NY".OR.STATE="PA"
are same, no? I accept what VFP "normalizes" to, seems ugly but it is the same thing at the end.

Why would you ever want to use "Set Filter" is another question. I can't think of a real world use case.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform