Re: SQL Server 200 "Timeout Expired"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: VMP (VMP_at_discussions.microsoft.com)
Date: 12/28/04


Date: Mon, 27 Dec 2004 23:43:07 -0800

Oops!.. I meant CommandTimeout, that's been set to 0

"David Gugick" wrote:

> VMP wrote:
> > Hi,
> >
> > I'm developing an application in VB using ADO and I'm connecting to
> > SQL Server 2000 (SP3).
> >
> > I'm facing an infrequent TIMEOUT error.
> >
> > I have set the connection time out to 0 (unlimited) on the Connection
> > object. I'm using a global connection object across the application
> > and opening 2-3 recordsets at a time. Which I close after use.
> > YES, I've read an article on Microsoft that speaks about ADO spawing
> > more connections implicitly!
> > I have updated MDAC on my PC from 2.6 to 2.8 (that's the latest!)
> > and tried using a DSN (SQL ODBC Driver) as well as SQLOLEDB Provider.
> > I've specified the alias name for the server as well as the IP
> > address (its slow with the IP address)... BUT .. I still keep getting
> > the message "Timeout Expired".
> > The SQL Server is accessed over the same domain as the client PC,
> > with NT authentication.
> > This message appears even as I try to login. Its doesnt always come
> > as I execute a stored procedure or query.
> >
> > I hope I've provided ample data for you to tear your hair out as
> > well!! ;) Please advise...
> > I've rummaged thru many web-sites and forums for answers.. tried many
> > a solution .. but all in vain.
> >
> > VMP
>
> Try setting the CommandTimeout on the Command object. The connection
> timeout is only for connecting, not executing.
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
>



Relevant Pages

  • Re: DAO vs ADO
    ... Depending on how you're connecting to SQL Server, yes, it might make sense ... to use ADO. ... I've written applications where my communication to SQL Server was all done ... DAO was designed specifically for use with Jet databases (i.e.: ...
    (microsoft.public.access.modulesdaovba)
  • Re: Large varchar columns with SQL server
    ... I'm connecting to a SQL ... Did you read the KB articles they pointed to: ... I can also add that since ADO 2.6, if you do get DB_E_ERRORSOCCURRED on ... present than is necessary to demonstrate event handling. ...
    (microsoft.public.data.ado)
  • Re: Problems with carating Stored Procedure from ADO
    ... connecting to SQL Server! ... > May bee ADO find parametrs in Create query.. ...
    (microsoft.public.sqlserver.server)
  • Select * returns Unspecified error, but Select ID WORKS --- Help !!!!
    ... I am trying to track down why Delphi and ADO is having a problem ... I am connecting to Sybase database, when I try to perform the ...
    (borland.public.delphi.database.ado)