Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WestWind/database filter help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01516279
Message ID:
01523654
Vues:
71
>>I've since gotten this to work the way I intended, but I wanted to update it to allow the user to search on two different fields if need be. How can I make it also look to another variable for the searching like the code below?
>>
>>
cmd = [exec InTransitRN ?']+fdBlNo+[']
>>
>>So basically I want them to be able use the above if they have that number, but also search on this one:
>>
>>
cmd = [exec InTransitRN ?']+fdRefNo+[']
>>
>>Is there a way to combine the two somehow or does it have to be done separately? Would a CASE statement work here? I was thinking of having it check to see which text box had data in it and use the associated code based on that. I don't know if that's a good way to do it though.
>
>I'd just pass both fields as parameters, then modify the stored proc. to determine which query to use.
>
>
>* Assuming variable named fbBINo and fdRefNo contain values from text box (or are empty)
>cmd = [exec InTransitRN ?fdBlNo, ?fdRefNo]
>
>
>The only question would be will the user see both search fields, or just one of them at a time? Depending on the answer, you'll have to change the stored procedure accordingly. I'd just use an IF statement in the T-SQL to do this.


Yep, not working. I don't think it's the HTML or SQL code that's a problem, I think it's something in the VFP code that isn't passing what's in the textbox through... I can run the SP in SQL Server and enter a number and it works fine.

Not sure what to do from here, the original lookup still works but...

Ok wow, I literally just tried it again to see what it was doing and now it's working perfectly fine... I have no idea what happened between 11:48 (when I last built the project) and now, but I swear it wasn't finding any records when using the other text box and I didn't change anything. Very odd.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform