Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Tue, 22 Jan 2008 22:28:53 +0100,    group: microsoft.public.sqlserver.odbc        back       


Timeout - why?   
Hello,

I am using SQL-Server 2000 SP4 (on Windows 2003 SBS SP2 - not R2!).

I use MS Excel with ADO to connect to the SQL-Server. I get a timeout after 
30 sec with this connection "Microsoft OLE DB Provider for SQL Server". 
However, I do not get a timeout when using "SQL Server with ODBC". What 
would be the preferred method to query an SQL Server?

1) SQL native Client (ODBC)
2) SQL Server (ODBC)
3) Microsoft OLE DB Provider for SQL Server
4) .Net Providers (but I could not find a free one)

Can you tell me why there is no timeout when using ODBC but there is one 
when using OLE DB Provider for SQL? Where can I set that timeout? There are 
some possible settings in SQL Server but none of them is used (= no timeout) 
or it is 600 sec, so, where is that timeout setting hidden?

regards

arno
date: Tue, 22 Jan 2008 22:28:53 +0100   author:   arno nospam@invalid

Re: Timeout - why?   
arno,

I don't know why OLE DB and ODBC have different timeout tolerance for you. 
However, the 30 seconds is not a SQL Server setting, but it is a client ADO 
setting.  You can direct ADO to use a different timeout period such as:
    0 = never timeout
    600 = timeout after 10 minutes

From: http://www.davidj.org/docs/ado_iis_timeout.html
dim myConn
   Set myConn = Server.CreateObject("ADODB.Connection")
   myConn.CommandTimeout = 0
   myConn.Open "Provider=MSDASQL;Driver={SQL 
Server};Server=server;Database=database;UID=uid;PWD=pwd;"

RLF

"arno" <nospam@invalid> wrote in message 
news:uWKQ51TXIHA.5880@TK2MSFTNGP04.phx.gbl...
> Hello,
>
> I am using SQL-Server 2000 SP4 (on Windows 2003 SBS SP2 - not R2!).
>
> I use MS Excel with ADO to connect to the SQL-Server. I get a timeout 
> after 30 sec with this connection "Microsoft OLE DB Provider for SQL 
> Server". However, I do not get a timeout when using "SQL Server with 
> ODBC". What would be the preferred method to query an SQL Server?
>
> 1) SQL native Client (ODBC)
> 2) SQL Server (ODBC)
> 3) Microsoft OLE DB Provider for SQL Server
> 4) .Net Providers (but I could not find a free one)
>
> Can you tell me why there is no timeout when using ODBC but there is one 
> when using OLE DB Provider for SQL? Where can I set that timeout? There 
> are some possible settings in SQL Server but none of them is used (= no 
> timeout) or it is 600 sec, so, where is that timeout setting hidden?
>
> regards
>
> arno
>
>
>
date: Wed, 23 Jan 2008 13:31:31 -0500   author:   Russell Fields

Re: Timeout - why?   
Hi Russel,

>Set myConn = Server.CreateObject("ADODB.Connection")
>   myConn.CommandTimeout = 0

that's it!

It is a bit confusing that commandtimeout is related to a command opject but 
used on a connection object.

regards

arno
date: Thu, 24 Jan 2008 08:53:20 +0100   author:   arno nospam@invalid

Re: Timeout - why?   
arno,

Yes, you are absolutely not the first one to be confused.  Think of it as 
setting the timeout for all commands on this connection.

RLF


"arno" <nospam@invalid> wrote in message 
news:Ojpfe3lXIHA.4828@TK2MSFTNGP05.phx.gbl...
> Hi Russel,
>
>>Set myConn = Server.CreateObject("ADODB.Connection")
>>   myConn.CommandTimeout = 0
>
> that's it!
>
> It is a bit confusing that commandtimeout is related to a command opject 
> but used on a connection object.
>
> regards
>
> arno
>
date: Thu, 24 Jan 2008 10:54:11 -0500   author:   Russell Fields

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us