Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid control cannot be used in FoxPro
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00068131
Message ID:
00068164
Vues:
41
>I have a following table:
>
>CREATE TABLE document ( doctype C(1), id N(7), .... )
>INDEX ON doctype TAG doctype
>
>This table contains 200000 records and sometimes only some of them are of
>doctype=='A' .
>
>BROWSE FOR doktype='A' works fast. I want to edit this table in a grid. I issue the command
>
>SELECT document
>SET ORDER TO
>SET FILTER TO doctype='A'
>
>in load event of a form.
>
>When this form runs, the grid will appear extremely slowly. It seems that
>FoxPro will not use index in grid refresh: it scans the whole table. Also,
>when user presses up/down arrow in first/last row, this scanning begins again.
>Therefore, FoxPro cannot be used for data editing in a table.
>Maybe this can be resolved using local views, but this requires using a database, but my table is for compatibility reasons free table?
>Maybe the following trick helps: adding a dummy non-visible master grid to form and making dummy parent-child relationship. However, child grid order cannot be controlled if this is used?

If the load time with a view is still slow because of the number of records, your idea of a dummy parent-child relationship should be extended to make it real. Use a lookup table that has JUST the doc types - A, B, etc. Use that DOCTYPES table as the master and your DOCUMENTS table as the child. Set the DOCTYPES to the correct record and be sure you have a tag on the document type in DOCUMENTS. Also, if you want to show the documents in a particular order, this tag could be on DOCTYPE + DOCDATE or any appropriate field name. I use this regularly to order child records in a grid alphabetically, by date, etc.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform