...

View Full Version : GoTo problems



landon11
02-13-2003, 08:33 PM
I have this and I get the "Expected statement" error on the GoTo RetryCalc line.


RetryCount = 0
RetryCalc:
RC = ControlObj.Socket(objWeb.RequestNo, "NC ")
if RC <> 0 then
if RC = 999 then
RetryCount = RetryCount + 1
Set ControlObj = nothing
Set ControlObj = Server.CreateObject("IISConvert.WebControl")
if RetryCount < 6 then
GoTo RetryCalc
else
ErrorMessage = ErrorMessage & "Cannot establish Socket Connection." & "\n"
exit funciton
end if
else

landon11
02-13-2003, 08:52 PM
Upon further searching it looks like you cannot use the goto lable in asp, you can only use onError GoTo bla. Does anyone know another way of doing what I'm trying to do?
Thanks

Roy Sinclair
02-13-2003, 09:11 PM
While condition
.. statements here
Wend

or

do while condition
.. statements here
loop

or

do until condition
.. statements here
loop

or

do
.. statements here
loop while condition

or

do
..statements here
loop until condition

landon11
02-13-2003, 09:21 PM
Thank you, I was in the process of trying "Do Until'

whammy
02-15-2003, 02:27 AM
goto is not supported in Visual Basic Scripting Edition.

See MSDN for documentation.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum