Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.02.04;
Скачать: CL | DM;

Вниз

ADO   Найти похожие ветки 

 
VA   (2001-12-31 01:52) [0]

Кто-нибудь подскажет как изменить время ожидания выполнения запроса. ADOConnection.CommandTimeout похоже не помогает


 
kig   (2001-12-31 17:08) [1]

The CommandTimeout setting on a Connection object has no effect on the CommandTimeout setting on a Command object on the same Connection; that is, the Command object"s CommandTimeout property does not inherit the value of the Connection object"s CommandTimeout value.

Явно назначайте CommandTimeout для ADODB.Command


 
Delirium ©   (2002-01-01 13:15) [2]

Это делается в настройках самого MSSQL, а CommandTimeout может лишь ограничить это время, но не увеличить его.


 
Mute   (2002-01-04 13:13) [3]

Можно написать свой компонент. Что-то типа:

type
TDCADOQuery = class(TCustomADODataSet)
private
{ Private declarations }
FSQL: TSTrings;
FRowsAffected: Integer;
function GetSQL: TStrings;
procedure SetSQL(const Value: TStrings);
function GetCommandTimeout: integer;
procedure SetCommandTimeout(Value: integer);
procedure Close;
protected
{ Protected declarations }
procedure QueryChanged(Sender: TObject);
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function ExecSQL: Integer; {for TQuery compatibility}
property RowsAffected: Integer read FRowsAffected;
published
{ Published declarations }
property DataSource;
property EnableBCD;
property ParamCheck;
property Parameters;
property Prepared;
property SQL: TStrings read GetSQL write SetSQL;
property CommandTimeout: integer read GetCommandTimeout
write SetCommandTimeout default 30;
end;


 
handra ©   (2002-01-04 16:12) [4]

У TADOConnection в событиях на OnWillExecute напиши строчку:

Command.CommandTimeout := Connection.CommandTimeout;

C CommandTimeout - это явный баг господ из Борланда...



 
Delirium ©   (2002-01-04 16:33) [5]

Загляни сначала сюда:
Enterprise Manager->Твой сервер->Properties->Connections->Query time-out


 
handra ©   (2002-01-04 16:52) [6]

>Delirium ©
как правило стоит 0, т.е. unlimited
хотя команды без той строчки, которую я указал вверху,
выполняются с тайм-аут 60 секунд


 
Delirium ©   (2002-01-04 17:26) [7]

> handra
А сколько клиентов у вас ?



Страницы: 1 вся ветка

Текущий архив: 2002.02.04;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.01 c
14-8986
AlexH
2001-12-10 10:30
2002.02.04
Опять девушки


14-9001
Awex
2001-12-10 16:07
2002.02.04
Какое пиво лучше ?


3-8780
tovSuhov
2002-01-05 10:55
2002.02.04
Подскажите, где достать хелп по языку PL/SQL...


1-8894
Ольга
2002-01-16 14:01
2002.02.04
Инсталлятор


1-8874
Antoniz
2002-01-16 10:00
2002.02.04
Работа с потоками