Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display a big remote view - Fetch options
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00121637
Message ID:
00121644
Vues:
16
Renato,

MaxRecords sets the maximum number of records returned by your query. If you set MaxRecords to 500 and the query results in 1500 records, only the first 500 will be returned by the back end to VFP.

Fetch size determines how many records will be fetched at a time. If you set it to 500 and your query results in 1500 records, your view will be available with 500 records as soon as the first 500 records have been fetched from the server. The other 1000 records will be fetched automatically in 500 records increments. So if you display the grid it will first have 500 records. If the user scrolls down, he may come to the end of the view, only to see more records appear as they are fetched from the server.

You should know that while these records are being fetched the connection the view is using will be busy meaning that you won't be able to USE or REQUERY() another view that shares the connection of the view you just opened. You can use SQLCANCEL() to stop the fetching before it's complete if the user chooses to close the form or if you want to stop fetching mid-stream.

Also, keep in mind that the entire query will be completed before any records are returned to VFP. So if it takes a long time just to process the query, setting the fetch size will not shorten that part of the query.

Finally, one downside to FetchSize is that it will make your overall query take longer. The smaller the FetchSize setting, the longer it will take to get all the records back from the server.

>Hi to all,
>
>I've to display a big remote view, I know that with FetchSize or MaxRecords I can say to fetch N records each time, but I haven't use it before now so my question is:
>
>Which difference between MaxRecord and FetchSize ?
>How does the FetchSize option work ? The SELECT on the server is completed before to retrieve my first N records or what ? If I set the view as RecordSource of a grid the new record will be loaded when I scroll down by itself or I have to do a requery o sqlmoreresult or other ?
>
>Which is the best way to display totally a big view in a grid ?
>
>thanks in advance
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform