Board index » delphi » ADOConnection.Commandtimeout seems not work

ADOConnection.Commandtimeout seems not work

The default value of the ADOConnection.Commandtimeout is 30 (second).And I have a storeprocedure in MS SQL7 witch will work out for 34 second and/or  more time,so I set the Commandtimeout's value to 120, but it seems not work.

 

Re:ADOConnection.Commandtimeout seems not work


Quote
>The default value of the ADOConnection.Commandtimeout is 30 (second).And I have a storeprocedure in MS SQL7 witch will work out for 34 second and/or  more time,so I set the Commandtimeout's value to 120, but it seems not work.

TadoStoredProc commandtimeout does not work.   You can use a TadoCommand
component if the stored procedure does not return a record set and TadoDataSet
if it does return a dataset.

Or in code you can set the command timeout by casting it as a TdoDataset.

TadoDataset(AdoStoredProc1).commandTimeOut := 60;
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:ADOConnection.Commandtimeout seems not work


If you are using any other ADO component such as a TADOCommand then
you must also set the CommandTimeout value on it also since when it is
initialized it will erase the value on your TADOConnection object.

Dennis Passmore
Ultimate Software, Inc

Re:ADOConnection.Commandtimeout seems not work


 TadoCommand returns a "_RecordSet".

Dennis Passmore
Ultimate Software, Inc

Re:ADOConnection.Commandtimeout seems not work


Quote
>TadoCommand returns a "_RecordSet".

Yes but that is not the best choice if you want to hookup to any data aware
controls.
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads