Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter and WHERE
Message
From
05/06/2008 19:04:15
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01294821
Message ID:
01322002
Views:
28
>>>>Borislav,
>>>>
>>>>Thanks for your input.
>>>>
>>>>I am assuming that I can accomplish that in the BeforeCursorFill method?
>>>>
>>>>Scott
>>>>
>>>>>
>>>>>You have tw differen options.
>>>>>1. What Naomi already suggested - rebuild SelectCMD and use CursorFill() instead of CursorRefresh() method.
>>>>>2. Built such SelectCmd that accept multiple parameters.
>>>>>
>>>>>In your case I'm with Naoimi. Build new SelectCmd and Fill the cursor again.
>>>
>>>Yes, you could change SelectCMD there, but If you want to change it again you should call CursorFill() not CursorRefresh()
>>
>>That may be a problem. The search form I am using has a grid on it. Calling the CursorFill() method does funky things to grids when you change requery the cursor adapter. I need to use CursorRefresh() to make the grid behave properly. So, maybe this solution may not work to solve my problem?
>>
>>Scott
>
>In addition to what other already suggested to you, you could do:
>
>*** Define your SelectCMD that way:
>Select lastname from People ;
>    INNER JOIN statushistory on people.peostcfk = statushistory.sthid ;
>WHERE people.peoschfk = ?nschfk                                                              AND
>      (ISNULL(?cStartLast,'')  = '' OR poeple.peolastname BETWEEN ?cStartLast AND ?cEndLast) AND
>      (ISNULL(?nssn,'')        = '' OR people.peossn = ?nssn)
>
>
>But before you invoke any of the methods (CursorFill() or CursorRefresh()) you should define all parameters:
>
>nschfk = ?????
>cStartLast = ''
>cEndLast   = ''
>nssn       = ''
>.CursorRefresh() && or CursorFill()
>
Thanks for all the information and suggestions Borislav. I am doing some testing to decide which way will work best for us. I really appreciate your input!

Thanks again!
Previous
Reply
Map
View

Click here to load this message in the networking platform