Results 1 to 6 of 6

Thread: what might be the course of this error

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    soweto
    Posts
    32

    Angry what might be the course of this error

    error 'ASP 0113'
    Script timed out

    /News.asp

    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeOut or by changing the value in the IIS administration tools.

    fanny enough ,i am able to view other asp page without any hassles.
    pls help
    I know

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Basically, the problem is that the code is running for so long, it's timed out.could be that you have an endless loop in your code but without seing it, there is no way to tell. if you could post it, I should be able to tell you whats wrong.

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    soweto
    Posts
    32

    What might be the course of this error? ian

    <%@Language = vbscript%>
    <%

    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "Provider=SQLOLEDB.1;Data Source=servername;Persist Security Info=False;UID=?"
    objConn.Open
    objConn.DefaultDatabase = "dbName"

    Set cmd= Server.CreateObject("ADODB.Command")
    Set cmd.ActiveConnection = objConn

    cmd.CommandText = "SELECT Registration_ID, LekgName, date, AnnBy, News FROM LekgotlaNews WHERE Registration_ID = ?"

    cmd.parameters(0)=session("session name")

    Set rst = Server.CreateObject("ADODB.Recordset")
    Set rst = cmd.Execute

    cmd.Execute

    If rst.EOF then
    Response.ReDirect "http://url name/NewsResponse.asp"
    Else
    do until rst.eof
    strname=rst("LekgName")
    strtype=rst("Date")
    strRegid=rst("Annby")
    strday=rst("News")
    loop

    End if

    %>
    'Set rst = nothing
    'objConn.Close

    loop start

    <%do until rst.EOF %>

    <td width="25%"><font size="1" face="Verdana">Lekgotla Name:</font></td>
    <td width="75%"><font size="1" face="Verdana"><%=strname%></font></td>
    </tr>
    <tr>
    <td width="25%"><font size="1" face="Verdana">Date:</font></td>
    <td width="75%"><font size="1" face="Verdana"><%=strtype%></font></td>
    </tr>
    <tr>
    <td width="25%"><font size="1" face="Verdana">Announced By:</font></td>
    <td width="75%"><font size="1" face="Verdana"><%=strRegid%></font></td>
    </tr>

    <%rst.movenext%>
    <%loop%>

    loop end
    I know

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    yep, its defiantely, a infiante looping problem. you have this code here

    do until rst.eof
    strname=rst("LekgName")
    strtype=rst("Date")
    strRegid=rst("Annby")
    strday=rst("News")
    loop

    but you have not got a recordset.movenext so it is not breaking out of that loop.

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  5. #5
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Looking at your code more, I think you want it like this

    Code:
    <%@Language = vbscript%>
    <%
    
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "Provider=SQLOLEDB.1;Data Source=servername;Persist Security Info=False;UID=?"
    objConn.Open
    objConn.DefaultDatabase = "dbName" 
    
    Set cmd= Server.CreateObject("ADODB.Command") 
    Set cmd.ActiveConnection = objConn
    
    cmd.CommandText = "SELECT Registration_ID, LekgName, date, AnnBy, News FROM LekgotlaNews WHERE Registration_ID = ?" 
    
    cmd.parameters(0)=session("session name")
    
    Set rst = Server.CreateObject("ADODB.Recordset")
    Set rst = cmd.Execute
    
    cmd.Execute
    
    If rst.EOF then 
    Response.ReDirect "http://url name/NewsResponse.asp"
    Else
    do until rst.eof
    strname=rst("LekgName")
    strtype=rst("Date")
    strRegid=rst("Annby")
    strday=rst("News")
    
    <tr>
    <td width="25%"><font size="1" face="Verdana">Lekgotla Name:</font></td>
    <td width="75%"><font size="1" face="Verdana"><%=strname%></font></td>
    </tr>
    <tr>
    <td width="25%"><font size="1" face="Verdana">Date:</font></td>
    <td width="75%"><font size="1" face="Verdana"><%=strtype%></font></td>
    </tr>
    <tr>
    <td width="25%"><font size="1" face="Verdana">Announced By:</font></td>
    <td width="75%"><font size="1" face="Verdana"><%=strRegid%></font></td>
    </tr>
    
    <%
    rst.movenext
    loop
    End If
    %>
    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  6. #6
    Lively Member Wally Pipp's Avatar
    Join Date
    Jan 2002
    Location
    Carnivàle
    Posts
    79
    The course of this error is towards infinity for reasons Ian explained already
    A post brought to you by the Grim Reaper Appreciation Society™

    "Buy your lifetime subscription now and save on your coffin"

Posting Permissions

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



Click Here to Expand Forum to Full Width