Starting to build our first UniGui project I face myself in a situation I need an answer to.
With a standard unigui login form. I would like to be able to have multiple databases available.
Not for selection - but via the users login, through our user-api that handles auth.
The database alias (an entry in firedac connections file - ConnectionDefName) is returned from our api and I now need to set the name on the TFDConnection.
function TUniMainModule.ChooseDatabaseConnection(aDatabaseConnectionDefName: string): boolean;
begin
if FDManager.IsConnectionDef(aDatabaseConnectionDefName) then
begin
DBConn.Close;
DBConn.ConnectionDefName := aDatabaseConnectionDefName;
end;
end;
This works - but only if the setting - POOLED is set to false in my connections file.
I'm loading FDDrivers.ini (specific different vendor files) in the Creation of the servermodule.
And the Connections.ini (databases) is loaded in mainmodule creation.
Should I do anything specific to be able to use pooled=true ?