A while ago we switched to a later version of SDAC, onyl to find out that the standard command timeout of -1 was replaced, by default, with a command timeout of 2 seconds.
This is not ideal for us, and I am looking for a clean way to specify the command time on a newly created connection.
Just to be sure this what I am doing now is the right approach??
Suggestions are appreciated
regards
Paul
In the TDAConnectionManager component I have attached the following code to the OnConnectionCreated event
procedure TdmDriverConnectionModule.DAConnectionManagerConnectionCreated(
Sender: TDAConnectionManager; const Connection: IDAConnection);
begin
InternalPrepareCommandTimeOut(Connection);
end;
procedure TdmPSPASUserconnectionCache.InternalPrepareCommandTimeOut(const
AConnection: IDAConnection);
var
connObject : IDAConnectionObjectAccess;
connectionDriver : TMSConnection;
begin
if AConnection.Connected then
begin
Exit;
end;
if Supports(AConnection, IDAConnectionObjectAccess, connObject) then
begin
connectionDriver := TMSConnection(connObject.ConnectionObject);
connectionDriver.Options.DefaultLockTimeout := -1;
AConnection.Open();
end;
end;