Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random error
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Random error
Divers
Thread ID:
00569767
Message ID:
00569767
Vues:
41
I have a form with grid and timer. It 24 hours/day displaing some data. Timer interval is between 10 and 60 seconds. This form running sometime 1 week without error and sometime it crashes after hours.
Timer event call this code:

thisform.timer.enabled=.f.
thisform.grid.RecordSource=""
thisform.grid.ColumnCount=0
* select from Oracle backend
if SqlExec(handle,"select ...","MyAlias")
if reccount()=0
* display no data
else
with thisform.grid
.ColumnCount=5
.RecordSource="MyAlias"
endwith
with thisform.grid.column1
.ControlSource="MyAlias.field1"
.DynamicBackColor="iif(MyAlias.field5=1,rgb(255,0,0),rgb(255,255,255))"
endwith
* other columns, only text controls
endif
else
* display error connection to Oracle
endif
thisform.timer1.enabled=.t.
*(I'm making all my grids this way with no problems.)

Error is coming with "error 10" - syntax of DynamicBackColor is invalid. Why ?
So I run this form in development environment and after some days I've got the error and under this I found popular error C000005.

I found only one way - put ListBox instead of grid. But it's not solving problem.

Does help removing and adding grid object or other trick ?

Pavel
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform