Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: GoTo problems

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    GoTo problems

    I have this and I get the "Expected statement" error on the GoTo RetryCalc line.
    Code:
     
      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
    USA

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    USA

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you, I was in the process of trying "Do Until'
    USA

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    goto is not supported in Visual Basic Scripting Edition.

    See MSDN for documentation.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •