Board index » delphi » CommandTimeout problem

CommandTimeout problem

Hi!

I use TADOQuiery in TRemoteDataModule in Delphi 5.
I Use MS SQL Server 2000;

TADOQuery.SQL.Text := 'SELECT * FROM MyTable WITH (NOLOCK)'
I start a stored procedure which updates record in MyTable.
Then I update the same record of MyTable on client side of my application (I
use TClientDataSet for that), but execution of my stored procedure isn't
finished yet. Then I call TClientDataSet.ApplyUpdates. This record is locked
and the cliend side waits stored procedure to stop. For that reason I
decrease TADOConnection.CommandTimeout, but there isn't  a diffrernce.

What should I do?

Thanks in advance!

Ivo

 

Re:CommandTimeout problem


Quote
>For that reason I
>decrease TADOConnection.CommandTimeout, but there isn't  a diffrernce.

CommandTimeout doesn't work with the TadoQuery component.
You can use the tAdodataset component or from code cast the TadoQuery as a
TadoDataset and set the command time out

(TadoQuery as TadoDataset).CommandTimeOut := 100;
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:CommandTimeout problem


(adoQuery as TadoDataset).CommandTimeOut := 100;
has errors. can't cast.

Brian Bushay TeamB <BBus...@Nmpls.com> wrote:

Quote

>>For that reason I
>>decrease TADOConnection.CommandTimeout, but there isn't  a diffrernce.

>CommandTimeout doesn't work with the TadoQuery component.
>You can use the tAdodataset component or from code cast the TadoQuery as a
>TadoDataset and set the command time out

>(TadoQuery as TadoDataset).CommandTimeOut := 100;
>--
>Brian Bushay (TeamB)
>Bbus...@NMPLS.com

Re:CommandTimeout problem


Quote
>(adoQuery as TadoDataset).CommandTimeOut := 100;
>has errors. can't cast.

change that to
TadoDataset(adoQuery1) .CommandTimeOut := 100;
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads