CommandTimeout not working

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

CommandTimeout not working

Post by martin » Wed 08 Jul 2009 13:32

I tried to apply a custom CommandTimeout to our Connection as described in the readme.htm file that comes with the drivers but it does not work.

Tried the following

CRSQLConnection.Params.Values['CommandTimeout'] := '3';

and also tried

CRSQLConnection.Params.Values['Command Timeout'] := '3';

both before opening the connection, but no effect. Opened a long running query which did not return before completion. Maybe 30-40 Seconds.

Delphi 6.02
Latest dbxsda drivers and sources
SQL Server 2008


Any help greatly appreciated.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Thu 09 Jul 2009 10:43

Any feedback from Devart ? :roll:

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Thu 09 Jul 2009 21:10

To whom it may concern,

We are a paying customer of DevArt (formerly CoreLAb) since years and we are therefore expecting a certain level of support.

This is an urgent problem for us (as are the other two issues currenlty open see forum). We are using dbexpress drivers for real world applications not just for fun.

If DevArt is unable or unwilling to solve the problem, please drop a message saying that so we don't have to poll the forum every hour to see if you have kindly posted a solution or answer.

If there is another support channel that we should use, let us know.

Thanks
Martin

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 10 Jul 2009 14:10

We could not reproduce this problem with simple WAITFOR command. Please specify your SQL statement.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Fri 10 Jul 2009 18:18

SELECT * FROM Table

where Table is a large Table with 15 million rows. Open() does not come back for a very long time.

We have specified Params.Values('Command Timeout') := '3'; before opening the connection.

No abort after 3 seconds.

Tried with SqlOLEDb and native Client libraries.

no luck :(

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 13 Jul 2009 08:51

When FetchAll is True the open operation consists of statement execution and data fetching. The CommandTimeout parameter affects statement execution and fethcing of data blocks separately. So it does not affect anything. Please consider using FetchAll = False mode.

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Mon 13 Jul 2009 09:59

Challenger wrote:When FetchAll is True the open operation consists of statement execution and data fetching. The CommandTimeout parameter affects statement execution and fethcing of data blocks separately. So it does not affect anything. Please consider using FetchAll = False mode.
Ok, I see.

Could you show me a snippet of code for Delphi6 that set's timeout=3 and fetchall=false just to make sure, I'm using the right way to set those two params ?

Thanks
Martin

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 20 Jul 2009 11:50

martin wrote:Could you show me a snippet of code for Delphi6 that set's timeout=3 and fetchall=false just to make sure, I'm using the right way to set those two params ?
You can use the following code:

Code: Select all

CRSQLConnection.Params.Values['CommandTimeout'] := '3';
CRSQLConnection.Params.Values['FetchAll'] := 'False';

martin
Posts: 52
Joined: Mon 07 Nov 2005 09:48

Post by martin » Tue 21 Jul 2009 07:43

Thank you Dimon.

Post Reply