Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can we have a grid on a memory array instead of a table
Message
De
16/12/1998 15:40:11
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00168189
Message ID:
00168247
Vues:
24
>>Is it possible to have a grid to affect a memory array instead of a table ?
>>
>>( ) I want to do a header-detail form with a single save button for the user to save both the header record and the multiple detail records. I would like to read the detail records into a memory array, have the user change it using a grid, and when he press the save-button, apply the changes from the array into the table.
>
>Eric --
>
>An array cannot be the data source for a grid. However, as Edward pointed out, you could use a cursor.
>
>If you use CREATE CURSOR, then the cursor will be updatable. You can populate it with rows from your detail table, update/add/delete the cursor rows from the grid, and then transfer the updated rows from the cursor back into your detail table.
>
>Another way to do this would be to create a parameterized view of your detail table, where the parameter would be the value of the foreign key in the detail table that links back to the primary key in the header table.
>
>In most cases, I think that using a view would be the preferred method, but of course, that depends on your business requirements.
>
>Hope this helps -- Bill

Just a minor note: there are certain situations when SEEK/SKIP cursor will be blazingly faster than p-view, even full Rushmore optimizable.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform