Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox not updating from Timer Control
Message
 
To
10/06/2003 08:40:10
Jeffrey Havelock
Skipton Information Group
Leeds, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00798311
Message ID:
00798312
Views:
23
Jeff,

Are you sure that the timer is firing? Make sure to set the timer.Enabled property to .T. after setting its interval.

Doug

>I'm working on a form that calls a SQLEXEC to kick off a server-side SQL stored procedure. A command button issues the SQLEXEC and then initiates the timer controls Interval property to check each second for the result.
>
>The problem I have is that whilst a stored procedure could be running for several minutes, my progress is not being reported to the textbox control as I require.
>
>I'm fairly new to VFP client/server applications - Has anyone got any ideas as to what may be wrong?
>
>CommandButton code:
>
>ThisForm.GenerateData=SQLEXEC(ThisForm.nFileHandle, "EXECUTE Walks.dbo.up_GenerateDataSupply 'J4666'")
>ThisForm.tmrGenerateData.Interval=10000
>
>Timer Event code:
>
>DO CASE
> CASE ThisForm.GenerateData=1
> ThisForm.txtGenerateData.Value=ALLTRIM(TIME())+" - Data Generation Completed"
> This.Interval=0
> CASE ThisForm.GenerateData=0
> ThisForm.txtGenerateData.Value=ALLTRIM(TIME())+" - In Progress"
> This.Interval=1000
> CASE ThisForm.GenerateData=-1
> ThisForm.txtGenerateData.Value=ALLTRIM(TIME())+" - Procedure Failed"
> This.Interval=0
>ENDCASE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform