>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement