Have you stepped through it with the debugger to see exactly which line is timing out? If you determined it was the .Movenext by doing this then was it the first time you issued a .Movenext...
Your headline says not all the time, some time... Could it be the 2 second timeout you've set in the connection string? In VB6 when connecting to SQLServer the default timeout was 30 seconds I think. Sounds like you might have set the timeout to 2 seconds, and sometimes you get results back in 2 secs, sometimes it takes longer (and timesout).
I try change the connect timeout but no use. The sql server and my asp code in same box, so 2 second for connect is enough.
The timeout happend on the line of .MoveNext , in the do...while loop is some code for output by format them.
Just feel very strange, because most of time timeout happened in execute sql query. And for my case, the data already got and saved in RS object, so I cannot understand why timeout at Movenext if ASP code not timeout yet.
Is there any code can setup timeout for after got data in RS object?