Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
X number of records before and after a certain record.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00132496
Message ID:
00132580
Vues:
15
I know that I can do that, but it still won't give met the result's I'm after.

For expample: A user has a 'vendor' screen. They enter the 'paramter' - let's say the Vendor number. They enter 500. Right now my parameterized view will use "VEND_NO = ?lcVend_No" (and lcVen_No is 500). So, I get the one matching record (500). But I want vendors 400-600 - the 500th and 100 records on either side. Make sense? So in this case it really doesn't matter what the MaxRecords is set to, or what the view is setup to return, I'm still stuck with the one record. My theory is that I'm stuck here unless there is a way to do it with the paramter AND also set the view as you suggested. Any thoughts on how to do it???

>The idea is to set view to return more than 100 records and then MaxRecords will limit this number to 100.
>
>>This question has me interested too. Lets say you have a paramaterized remote view, and becuase of the paramater, the view returns just one record. Is there an easy way to snag the 100 records on either side of one record returned? Or is their an easy way to make the paramter do it somehow?
>>
>>
>>>>I list this in Client/Server because the solution needs to deal with either a VFP database or some other backend (Oracle, SQL-Server). I need to be able to draw, let's say 200 records, 100 before and 100 after some specific record. How the user gets to the specific record will be handled typically by incremental searching. The desire is to only bring a limited number of records across the network and to display that limited record set. Of course this must be highly dynamic as the user changes positions in the entire table/view.
>>>>
>>>>Any good ideas?
>>>>
>>>>Thanks,
>>>>Steve
>>>
>>>If you CURSORSETPROP() MaxRecords property =100 for remote view than it will draw 100 records with proper ORDER. I guess it could be done even better in stored procedure, e.g. in SQL Server you can set @@ROWCOUNT=100 and UNION two SELECTs
ICQ 10556 (ya), 254117
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform