Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Substring search with Parm View?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00170654
Message ID:
00171120
Vues:
32
>>>If cUsrFirstChoice = 'Toolkit', then this works:
>>>
>>> where ?cUsrFirstChoice $ cTitle
>>>
>>>But if cUsrFirstChoice = 'Toolkit' and cUsrSecondChoice = ''
>>>then this returns no records:
>>> where ?cUsrFirstChoice $ cTitle
>>> and ?cUsrSecondChoice $ Subtitle
>
>>cUsrFirstChoice = "%" + lcYourVariable1 + "%"
>>cUsrSecondChoice = "%" + lcYourVariable2 + "%"
>>... where cTile like ?cUsrFirstChoice and SubTitle like ?cUsrSecondChoice
>>Of course you do not have to precede the variable with a percent sign if your search is to start at the beginning of the field.
>
>I can only get your first example to run if it's lcYourVariable not ?lcYourVariable, which is a requirement (I think) for Parameterized Views. I am trying to build a P-View giving VFP a substring to search instead of a standard "read left-to-right" search.

In that case, you would have percent signs in front and at the end of the string to search for. I do not know why you can not use the question mark. This is standard fare for those of us using parameterized views. It even works when all you pass is the percent sign.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform