homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

I got "Timeout expired" Error on .MoveNext
Sql Server 2005, timeout on record movenext (not always, sometimes)

5+ Year Member

Msg#: 3576183 posted 9:17 pm on Feb 15, 2008 (gmt 0)

here is the piece of code:

vShop_vSql = "select some from some table where some..." 'normal one
aConnStr = "Provider=SQLOLEDB;Data Source=#*$!;Initial Catalog=#*$!;User ID=#*$!;Password=#*$!;Connect Timeout=2"

Set vShop_oConn = CreateObject("ADODB.Connection")
vShop_oConn.Open aConnStr\
Set vShop_oRs = vShop_oConn.Execute(vShop_vSql)

Do while..



and got an Error on Movenext

Number: -2147217871
Category: Microsoft OLE DB Provider for SQL Server
Description: Timeout expired

Does anyone have solution, I already got data on oRs but timeout when movenext, so strange.




5+ Year Member

Msg#: 3576183 posted 5:21 am on Feb 16, 2008 (gmt 0)

Please, any idea welcome


WebmasterWorld Senior Member 5+ Year Member

Msg#: 3576183 posted 5:23 pm on Feb 17, 2008 (gmt 0)

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).


5+ Year Member

Msg#: 3576183 posted 7:34 pm on Feb 17, 2008 (gmt 0)

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?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved