Timeout expired? 
Author Message
 Timeout expired?

I am having some problems running some queries that return quite large
recordsets to my VB6 interface.  I'm running SQL6.5 and using ADO to
connect.

I am getting a 'Timeout Expired' error message after about 25 seconds
even though I have the .ConnectionTimeout set to 120.  Am I setting this
timeout in the wrong place because VB seems to be ignoring it.

Alternatively can anyone point me to a definiately source for coding
asychronous queries.  I've tried using these in the past but they just
don't work for me for some reason... the first rows of data still don't
get returned to the interface straight off.

The queries I'm running are optimised, they are not doing unnecessary
logical reads or scans it's just that the recordset they return can be
quite large (about 2500 rows of pretty close to 1962 bytes/row - I know
this because I added one too many field and it told me I had exceeded
the SQL limit!).  When I run the query in the iSQL window I get the
first record back almost instananeously trouble is I can get it to do
this with my VB interface.  I'm assuming I'm getting a Timeout because
the data has not been transported across the network not because the
query is slow to run?  I'm running on a 100mb network here too, so not
room for a cheap improvement there unfortunately.

Any ideas would be very much appreciated.

Julia



Tue, 19 Mar 2002 03:00:00 GMT  
 Timeout expired?
Julia,
For setting the command timeout, take a look at the following ADO FAQ:
http://www.able-consulting.com/ADO_Faq.htm#Q14

--

Thanks,
Carl Prothman, MVP, CCP
http://www.able-consulting.com

ADO FAQ: http://www.able-consulting.com/ado_faq.htm
RDS FAQ: http://www.able-consulting.com/rds_faq.htm


Quote:
> I am having some problems running some queries that return quite large
> recordsets to my VB6 interface.  I'm running SQL6.5 and using ADO to
> connect.

> I am getting a 'Timeout Expired' error message after about 25 seconds
> even though I have the .ConnectionTimeout set to 120.  Am I setting this
> timeout in the wrong place because VB seems to be ignoring it.

> Alternatively can anyone point me to a definiately source for coding
> asychronous queries.  I've tried using these in the past but they just
> don't work for me for some reason... the first rows of data still don't
> get returned to the interface straight off.

> The queries I'm running are optimised, they are not doing unnecessary
> logical reads or scans it's just that the recordset they return can be
> quite large (about 2500 rows of pretty close to 1962 bytes/row - I know
> this because I added one too many field and it told me I had exceeded
> the SQL limit!).  When I run the query in the iSQL window I get the
> first record back almost instananeously trouble is I can get it to do
> this with my VB interface.  I'm assuming I'm getting a Timeout because
> the data has not been transported across the network not because the
> query is slow to run?  I'm running on a 100mb network here too, so not
> room for a cheap improvement there unfortunately.

> Any ideas would be very much appreciated.

> Julia



Tue, 19 Mar 2002 03:00:00 GMT  
 Timeout expired?
You need to change the query timeout .

If you are using the command object:

    Dim cmd as ADODB.Command
    .....

    cmd.CommandTimeout = 120  ( default is 30 sec)

see ADO documentation for more details.


Quote:
> I am having some problems running some queries that return quite large
> recordsets to my VB6 interface.  I'm running SQL6.5 and using ADO to
> connect.

> I am getting a 'Timeout Expired' error message after about 25 seconds
> even though I have the .ConnectionTimeout set to 120.  Am I setting this
> timeout in the wrong place because VB seems to be ignoring it.

> Alternatively can anyone point me to a definiately source for coding
> asychronous queries.  I've tried using these in the past but they just
> don't work for me for some reason... the first rows of data still don't
> get returned to the interface straight off.

> The queries I'm running are optimised, they are not doing unnecessary
> logical reads or scans it's just that the recordset they return can be
> quite large (about 2500 rows of pretty close to 1962 bytes/row - I know
> this because I added one too many field and it told me I had exceeded
> the SQL limit!).  When I run the query in the iSQL window I get the
> first record back almost instananeously trouble is I can get it to do
> this with my VB interface.  I'm assuming I'm getting a Timeout because
> the data has not been transported across the network not because the
> query is slow to run?  I'm running on a 100mb network here too, so not
> room for a cheap improvement there unfortunately.

> Any ideas would be very much appreciated.

> Julia



Tue, 19 Mar 2002 03:00:00 GMT  
 Timeout expired?
what if you get the same error running a query directly from analyzer?
(and have a time-out set to 0)
Quote:

> You need to change the query timeout .

> If you are using the command object:

>     Dim cmd as ADODB.Command
>     .....

>     cmd.CommandTimeout = 120  ( default is 30 sec)

> see ADO documentation for more details.



> > I am having some problems running some queries that return quite large
> > recordsets to my VB6 interface.  I'm running SQL6.5 and using ADO to
> > connect.

> > I am getting a 'Timeout Expired' error message after about 25 seconds
> > even though I have the .ConnectionTimeout set to 120.  Am I setting this
> > timeout in the wrong place because VB seems to be ignoring it.

> > Alternatively can anyone point me to a definiately source for coding
> > asychronous queries.  I've tried using these in the past but they just
> > don't work for me for some reason... the first rows of data still don't
> > get returned to the interface straight off.

> > The queries I'm running are optimised, they are not doing unnecessary
> > logical reads or scans it's just that the recordset they return can be
> > quite large (about 2500 rows of pretty close to 1962 bytes/row - I know
> > this because I added one too many field and it told me I had exceeded
> > the SQL limit!).  When I run the query in the iSQL window I get the
> > first record back almost instananeously trouble is I can get it to do
> > this with my VB interface.  I'm assuming I'm getting a Timeout because
> > the data has not been transported across the network not because the
> > query is slow to run?  I'm running on a 100mb network here too, so not
> > room for a cheap improvement there unfortunately.

> > Any ideas would be very much appreciated.

> > Julia



Thu, 21 Mar 2002 03:00:00 GMT  
 Timeout expired?
Check the SQL Server Configuration for connections.

In SQL Server 7, using Enterprise Manager select the server and look at the
server properties (right mouse click) under Connections.  The Query timeout
can also be set there for all connections.

Ed Arib

Quote:
> what if you get the same error running a query directly from analyzer?
> (and have a time-out set to 0)


> > You need to change the query timeout .

> > If you are using the command object:

> >     Dim cmd as ADODB.Command
> >     .....

> >     cmd.CommandTimeout = 120  ( default is 30 sec)

> > see ADO documentation for more details.



> > > I am having some problems running some queries that return quite large
> > > recordsets to my VB6 interface.  I'm running SQL6.5 and using ADO to
> > > connect.

> > > I am getting a 'Timeout Expired' error message after about 25 seconds
> > > even though I have the .ConnectionTimeout set to 120.  Am I setting
this
> > > timeout in the wrong place because VB seems to be ignoring it.

> > > Alternatively can anyone point me to a definiately source for coding
> > > asychronous queries.  I've tried using these in the past but they just
> > > don't work for me for some reason... the first rows of data still
don't
> > > get returned to the interface straight off.

> > > The queries I'm running are optimised, they are not doing unnecessary
> > > logical reads or scans it's just that the recordset they return can be
> > > quite large (about 2500 rows of pretty close to 1962 bytes/row - I
know
> > > this because I added one too many field and it told me I had exceeded
> > > the SQL limit!).  When I run the query in the iSQL window I get the
> > > first record back almost instananeously trouble is I can get it to do
> > > this with my VB interface.  I'm assuming I'm getting a Timeout because
> > > the data has not been transported across the network not because the
> > > query is slow to run?  I'm running on a 100mb network here too, so not
> > > room for a cheap improvement there unfortunately.

> > > Any ideas would be very much appreciated.

> > > Julia



Thu, 21 Mar 2002 03:00:00 GMT  
 Timeout expired?
I have a problem, which has kind of the same direction:

I have a nice little vb-function, that opens an ado connection object
and sends an sql-query via ado to our sql7-server. The connectionstring
is 100% always the same when opening the connection object in that
function and all is working fine until that ONE certain point! THEN i
cannot execute ANY sql-query, even the simplest throws a timeout
exception.

My first idea was a lock upon any cells, but taking the query that
fails in vb and execute it in SQL Query Analyzer takes about
milliseconds and returns no error.

Any idea, what could be the cause?

Thanks in advance...

Uwe Bernitt



Quote:
> Check the SQL Server Configuration for connections.

> In SQL Server 7, using Enterprise Manager select the server and look
at the
> server properties (right mouse click) under Connections.  The Query
timeout
> can also be set there for all connections.

> Ed Arib


> > what if you get the same error running a query directly from
analyzer?
> > (and have a time-out set to 0)


> > > You need to change the query timeout .

> > > If you are using the command object:

> > >     Dim cmd as ADODB.Command
> > >     .....

> > >     cmd.CommandTimeout = 120  ( default is 30 sec)

> > > see ADO documentation for more details.



> > > > I am having some problems running some queries that return
quite large
> > > > recordsets to my VB6 interface.  I'm running SQL6.5 and using
ADO to
> > > > connect.

> > > > I am getting a 'Timeout Expired' error message after about 25
seconds
> > > > even though I have the .ConnectionTimeout set to 120.  Am I
setting
> this
> > > > timeout in the wrong place because VB seems to be ignoring it.

> > > > Alternatively can anyone point me to a definiately source for
coding
> > > > asychronous queries.  I've tried using these in the past but
they just
> > > > don't work for me for some reason... the first rows of data
still
> don't
> > > > get returned to the interface straight off.

> > > > The queries I'm running are optimised, they are not doing
unnecessary
> > > > logical reads or scans it's just that the recordset they return
can be
> > > > quite large (about 2500 rows of pretty close to 1962 bytes/row -
 I
> know
> > > > this because I added one too many field and it told me I had
exceeded
> > > > the SQL limit!).  When I run the query in the iSQL window I get
the
> > > > first record back almost instananeously trouble is I can get it
to do
> > > > this with my VB interface.  I'm assuming I'm getting a Timeout
because
> > > > the data has not been transported across the network not
because the
> > > > query is slow to run?  I'm running on a 100mb network here too,
so not
> > > > room for a cheap improvement there unfortunately.

> > > > Any ideas would be very much appreciated.

> > > > Julia

Sent via Deja.com http://www.deja.com/
Before you buy.


Mon, 01 Apr 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Timeout Expired

2. Error # 5 Timeout expired

3. Timeout expired

4. Timeout Expired Error

5. S1T00[Microsoft][ODBC SQL SERVER DRIVER] TIMEOUT EXPIRED ?????????

6. ODBC Query Timeout expired, WHY ??

7. Error 3234: ODBC--remote query timeout expired

8. VB App slows to crawl, also TimeOut Expired

9. S1T00[Microsoft][ODBC SQL SERVER DRIVER] TIMEOUT EXPIRED ????

10. Timeout Expired Error!!!

11. Timeout Expired (What is causing this???)

12. timeout expired

 

 
Powered by phpBB® Forum Software