Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOEVENTS - Side effects?

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,305
FR
Hi

I have a simple 'servicing' application that runs in VFP6 on a Windows 2003 web server (logged in, client app - not a service).

In order to free up resources, so the server can do other things - like serving up pages, I sprinkled a few DOEVENTS through the code.

Strangely, sometimes the DOEVENTS seems to be disconnecting my open tables... not ALL the time though.

Has anyone else come across this?

Code:
** this message appears
wait MyTable.MyField window nowait timeout 2
DOEVENTS
** this message sometimes causes an error to be thrown 'ALIAS MyTable not known'
wait MyTable.MyField window nowait timeout 2



Regards

Griff
Keep [Smile]ing
 
Is it truly disconnecting them or maybe trying to display a table from another data environment?

I haven't had any issues with DOEVENTS closing tables. Unless there was an EVENT somewhere that did it.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi,

I have no data environments set in this app - the tables required are opened by code, processed and then closed.

As far as I can tell it (was) losing the alias when the DOEVENTS was called, i.e. I could reference the table just before, and could not just after the call to DOEVENTS.

I've removed all the DOEVENTS for the time being...

Regards

Griff
Keep [Smile]ing
 
Do you have _VFP.Autoyield set to .T. (default)? If so, I don't see any reason why DOEVENTS would help you since your app is already processing windows events.

Andy
 
Hi Andy,

I don't know if it was helping, only crashing B-) , which is why I wasn't too worried when I took the DOEVENTS out.

I've not changed the _VFP.Autoyield setting, so presumably it is at the default (.t.) state

B-)

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top