Board index » delphi » TADOQuery and !CommandTimeOut

TADOQuery and !CommandTimeOut

Hi Delphi Developers!

I've been developing a database app and decided to use TADOQuery's as the
key dataset component. Now I've found out you cannot set the CommandTimeOut
property of this component. First I thought the ADOConnection component
would be leading, well, it isn't......the CommandTimeout of the connection
component only counts for it's own SQL execute's. So we have the
CommandTimeOut property available in the superclass TCustomADODataSet
(declared as protected), but not in the subclass TADOQuery. This means the
timeout of a TADOQuery will always be 30 secs (the default).

Now, I really don't want to mess with the VCL source code, knowing the
problems you can get into with later versions of Delphi. Has any of you run
into this problem, or have an elegant solution to this problem using the
TADOQuery component? Or should I use TADODataSet instead?

Thanx for your response,

Floris Smit, The Netherlands.

 

Re:TADOQuery and !CommandTimeOut


Quote
> problems you can get into with later versions of Delphi. Has any of you run
> into this problem, or have an elegant solution to this problem using the
> TADOQuery component?

TADODataSet(ADOQuery1).CommandTimeOut := 60;

Quote
> Or should I use TADODataSet instead?

I'd recomend the latter.

--
Vassil Nazarov
http://web.orbitel.bg/vassil/

Re:TADOQuery and !CommandTimeOut


Quote
>Now, I really don't want to mess with the VCL source code, knowing the
>problems you can get into with later versions of Delphi. Has any of you run
>into this problem, or have an elegant solution to this problem using the
>TADOQuery component? Or should I use TADODataSet instead?

Your best solution is to use the TadoDataset.  However you can also use

(YourTadoQuery as TadoDataset).commandTimeout :=
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads