Hi, I'm trying to establish a connection to Firebird, using the connection pool. In my project I have several datamodules, which I create and destroy continuously. The first datamodule that is created reads the connection configuration, connects (this does it well) and then saves the parameters of this connection in the connection definition (I use the folowing code): Connect is a TFDConnection component
var oDef: IFDStanConnectionDef: = FDManager.ConnectionDefs.AddConnectionDef;
oDef.Name:= defConn;
oDef.Params.Pooled: = true;
oDef.Params.DriverID: = 'FB';
oDef.Params.Database: = Connect.Params.Values ['Database'];
oDef.Params.Password: = Connect.Params.Values ['Password'];
oDef.Params.UserName: = Connect.Params.Values ['UserName'];
oDef.Params.Values ['ExtendedMetadata']: = 'true';
oDef.Params.Values ['CharacterSet']: = 'UTF8';
Then, when I open other datamodules, the first thing I do is assign the definition of the connection, and then I connect, but this gives an error it seems that it does not assign the user and password correctly:
Connect is the TFDConnection component of the new created datamodule
Connect.ConnectionDefName: = defConn;
Connect.Connected: = true; (this gives connection error)
Any suggestions of things to review and / or change?, thanks
Note: The datamodule where I set the connection parameters and establish the connection definition, is also destroyed after read and apply this settings.