Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code expansion error
Message
From
01/10/2012 13:39:10
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01554057
Message ID:
01554059
Views:
61
This message has been marked as a message which has helped to the initial question of the thread.
   if eval('Thisform.p_ivr.SocketWrench' + transform(i) + '.Connected')
     lcDummy = 'Thisform.p_ivr.SocketWrench' + transform(i) + '.Disconnect'
     & lcDummy
   endif
>Hi Gang!
>
>I have a question in my code below...
>
>I am wanting the loop at the bottom to shut down the SocketWrech's that are connected.... but when I run it, I get a Syntax error... command contains unrecognized phrase/keyword. Any idea what I did wrong? Thanks!
>
>lnLastSocket is global and is equal to 18
>
>
>LOCAL i
>i = 0
>
>IF VARTYPE(Thisform.p_ivr.SocketWrench0) <> 'U'	&& We have an object
>	IF Thisform.p_ivr.SocketWrench0.Listening
>		Thisform.p_ivr.SocketWrench0.Disconnect
>	ENDIF 
>	
>	FOR i = 1 TO lnLastSocket
>		IF Thisform.p_ivr.SocketWrench&i..Connected
>			Thisform.p_ivr.SocketWrench&i..Disconnect
>		ENDIF 
>	ENDFOR 
>ENDIF
>
>
>The error occurs on the "IF Thisform.p_ivr.SocketWrench&i..Connected" line.
>
>Thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform