General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only