Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: open
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")
Set vShop_oRs = vShop_oConn.Execute(vShop_vSql)
and got an Error on Movenext
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.
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).
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?