I've created a custom DBConnection Adapter based on TDriverConnectionAdapter. And are looking to see how to use it with Components aproach (instead of code only). What's the best (easyest) way?
Is there a way to use it with TAureliusConnection ?
OR
Is there a way to use it with TXDataConnectionPool ?
Or I should create a custom TXDataConnectionPool to be able to use it with TXDataServer component?
Use it in TAureliusConnection by registering the driver adapter and adding such code in a unit for a design-time package. Here is an example:
procedure RegisterDriverAdapter;
begin
TAureliusAdapterRegister.Instance.RegisterAdapterFactory('FireDac',
function(Args: TAdapterFactoryArgs): IDBConnection
begin
Result := TFireDacConnectionAdapter.Create(
Args.AdaptedConnection as TFDConnection, Args.SqlDialect, Args.Owner);
end
);
end;
initialization
RegisterDriverAdapter;