Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Practice on Refresh Grid with Data
Message
De
12/07/2020 08:45:22
 
 
À
10/07/2020 07:34:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01675136
Message ID:
01675142
Vues:
90
>Hi!
>
>In our big and Old VFP9 Application we Read data from SQL Server via SQLExec(), and show the Data in VFP – Grid.
>Sometimes we have to Reload the Data and since Years this is done in this sequence:
>- Reload the Data (sqlexec() ) into the same named Cursor as before.
>- Remove the Grid (oGrid.release() )
>- Create an New Grid Instance (newobject() )
>And, also since years, we fight against C5 Errors…
>
>This time I Reviewed this refresh-code and I asked me: Is this the right Order? Shouldn’t it be
>- Remove the Grid
>- Reload the Data
>- Create the Grid
>?
>
>What do you think? May this be a c5 Risky Code?
>
>How do you do this?
>
>Happy to hear your opinion

Jörg,
Please follow Tore's advise and use the Safe-Select method as outlined by Andy Kramek.
There is absolutely no need to
1) Remove the grid
and
3) (Re)create the grid.
use a cursor to populate your grid and and the next best solution is to make use of a View to populate your grid.
A view makes the use of the SafeSelect unness.
---
C0000005 errors, extremely difficult to debug, are often caused by a memory problem and in rare cases a data problem.
There is a procedure by Bernard Bout which you should start with your application to get the maximum of memory available.

Stay healthy,
Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform