Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Random error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00569767
Message ID:
00571273
Vues:
23
>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

Pavel, just try to see of the next has to do with it :

To my experience -in sort of random situations- a Timer on a Grid "is just not there". I mean, not because it is not there yet, but because it somehow temporarily is not visible to the VFP code. Now normally you would get an error on the Timer (-call) itself (when the timer elapses), but I guess this can cause other behaviour / problems as well. Remember, when I can get the error that the Timer doesn't exist because of the elapse of the timervalue itself (being part of the Timer), one can get in all kind of problems don't you think ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform