Multiple DB connections with TDAHETConnection

Hello,

my Delphi-DA-Server (6.0.51.881) has 10 services: One uses three different DB-Connections using HET-Connection, the others use the default connection.

In the service using the three connections I use HET as following:

procedure TRC_StatisticsService.DataAbstractServiceCreate(Sender: TObject);
var
connName: String;
begin
lHet := TDAHETConnection.Create(Schema.ConnectionManager.Connections);
lHet.Name := ‘HetConnection’;

connName := ‘GetOriginalProjectDetails=’+ Schema.ConnectionManager.Connections[1].Name;
lHet.ObjectMappings.Add(connName);

connName := ‘GetWorkingTime=’+ Schema.ConnectionManager.Connections[1].Name;
lHet.ObjectMappings.Add(connName);

connName := ‘GetAllWorkers=’+ Schema.ConnectionManager.Connections[2].Name;
lHet.ObjectMappings.Add(connName);

lHet.Default := True;
end;

procedure TRC_StatisticsService.DataAbstractServiceDestroy(Sender: TObject);
begin
lHet.Free();
Schema.ConnectionManager.Connections[0].Default := True;
end;

My problem: during running process in service with HET-Connection, other services acquiring connection throw exception "HET Connection does not contain an object mapping for “xyz”.

My only idea is to put ALL datasets and commands in HETs ObjectMapping, but in a projects with dozens of schemas it can’t be a solution to hard-code all mappings. Or is there an alternative to HET-Connection in this scenario?

Thanks for your help in advance

Stefan

Hello Stefan,

I was able to reproduce this situation with DA 6.0.51.881 . But with Winter 2011 this error doesn’t occur any more - so please retest with the latest DA version.

Best regards