|
-
Jun 17th, 2003, 12:30 AM
#1
Thread Starter
Fanatic Member
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
-
Jun 17th, 2003, 02:54 AM
#2
Hyperactive Member
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
-
Jun 17th, 2003, 04:23 AM
#3
Thread Starter
Fanatic Member
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...
-
Jun 17th, 2003, 05:02 AM
#4
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|