Assigning the DAC at runtime

Hello!

Because I am configuring UniDAC at runtime, I want to assign the TAureliusConnection at runtime as well after I have configured UniDAC.
Delphi 12, latest Aurelius

This is my code:

  ORMInvoicing.AdaptedConnection := InvoicingDBConnection;
  ORMInvoicing.SQLDialect := InvoicingDBConnection.ProviderName;
  ORMInvoicing.AdapterName := 'UniDac';
  FORM := ORMInvoicing.CreateConnection;

CreateConnection emits the following exception:

Project Fatturazione.exe raised exception class EAureliusConnectionException with message 'Adapter "UniDac" cannot create IDBConnection'.

Suggestions?

Thanks!

Solved. I realised I was missing a unit. Be nice if the exception offered that as a potential issue.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.