Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized IN
Message
From
23/04/2009 12:49:37
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01396004
Message ID:
01396100
Views:
51
Chris:

Thanks for taking the time to respond. Please see my response to Sergey for more detail about what I'm looking for.




>>
SQLEXEC(lnConnection,"SELECT * FROM myTable WHERE employee = ?emp")
>>
>>pops up a little dialog box and allows entry of a name to search against.
>>
>>I want to use the same functionality with IN
>>
>>
SQLEXEC(lnConnection,"SELECT * FROM myTable WHERE employee IN (?emp)")
>>
>>If I put in
NAME1,NAME2
I get nothing back
>>If I put in
"NAME1","NAME2"
I get just the first record
>>
>>How can I format the dialog response (or how else can I set up the query) to get the two (or any number of) names
>>
>>(I'm sure there are lots of other ways of doing this, but all I'm really interested in is how to do this with the parameterized query.)
>>
>>Thanks to all
>>
>>............Rich
>If you already put the parentheses there, then you need to pass in a string of strings: ["NAME1", "NAME2"]. To build this string, in your dialog box, allow for creating multiple entries by providing the user with a mechanism to add a new textbox to your dialog and then collect all of the entries in an array by means of the dialog's OK button. Loop through the array to build your name list and then pass it as your parameter. (Of course, you'll need to do a lot of work to do all of these steps.)
Previous
Reply
Map
View

Click here to load this message in the networking platform