Page 1 of 1
CommandTimeout not working
Posted: Wed 08 Jul 2009 13:32
by martin
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.
Posted: Thu 09 Jul 2009 10:43
by martin
Any feedback from Devart ?

Posted: Thu 09 Jul 2009 21:10
by martin
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
Posted: Fri 10 Jul 2009 14:10
by Challenger
We could not reproduce this problem with simple WAITFOR command. Please specify your SQL statement.
Posted: Fri 10 Jul 2009 18:18
by martin
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

Posted: Mon 13 Jul 2009 08:51
by Challenger
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.
Posted: Mon 13 Jul 2009 09:59
by martin
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
Posted: Mon 20 Jul 2009 11:50
by Dimon
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';
Posted: Tue 21 Jul 2009 07:43
by martin
Thank you Dimon.