Results 1 to 4 of 4

Thread: A lot of data

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Cool A lot of data

    hi i m using ms access on web for my site

    there is a lot of data when i click to show all list.

    it's start the process...

    then the script time out error comes before completing the
    list .....


    i alsow write server.scripttimeout=900

    but still this.....

    can any one how i solve this....

    thanks

  2. #2
    Hyperactive Member Anglo Saxon's Avatar
    Join Date
    Mar 2002
    Location
    Durham, UK
    Posts
    259
    You need to set the Command.CommandTimeout property here as well as the Server.Scripttimeout . The reason for this is that with the CommandTimeout, you are indicating how long to wait for the Command (your sql query) to execute, while with the Server.Scripttimeout you are indicating how long to wait for the page code to complete execution.

    If you are not explicitly using a Command object then you can still set the CommandTimeout using the connection object :
    Code:
    Set con = CreateObject("adodb.connection")
    con.CommandTimeout = 300
    con.Open "pubs", "sa", ""
    You must set the property before you open the connection and also take note that even if the user gets tired of waiting and tries to cancel the query by navigating to another page or closing their browser then the query doesnt stop running until it has either finished or it times out, this can be a big strain on the server if you set the timeout too long.

    --
    Anglo Saxon

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Cool

    but i m using rs to open a recordset and it's done one time

    my code is

    rs.open "select * from pubs order by pid",myconn

    do while not rs.eof
    response.write rs("pubid") & "==" & rs("pubname") & "<BR>"
    rs.movenext
    loop

    now wot u say...

  4. #4
    Hyperactive Member Anglo Saxon's Avatar
    Join Date
    Mar 2002
    Location
    Durham, UK
    Posts
    259
    Have you actually tried what I suggested?

    The CommandTimeout on a Connection applies to the Connection.Execute & Recordset.Open methods when you are not explicitly declaring a Command object as the source property. In other words setting the CommandTimeout on the connection object in your case is relevant because you are using the Recordset.Open method with a Connection as the source property.

    Understand?

    --
    Anglo Saxon

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