Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox not updating from Timer Control
Message
From
10/06/2003 08:40:10
Jeffrey Havelock
Skipton Information Group
Leeds, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Textbox not updating from Timer Control
Miscellaneous
Thread ID:
00798311
Message ID:
00798311
Views:
81
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
Jeff Havelock
Senior Data Developer
jeff.havelock@eurodirect.co.uk
Next
Reply
Map
View

Click here to load this message in the networking platform