Database access
Kofax AP Agility provides a database framework that is basically a thin layer on top of .NET System.Data.Common.DBConnection.
The ProjectContext DatabaseConnectionFactory property contains a reference to a DatabaseConnectionFactory from the ICAL.Framework.Database namespace. Use this to obtain an instance of an IDatabaseConnection for a given connection string. IDatabaseConnection contains methods for executing queries and other statements. For more information on this, please refer to the Kofax AP Agility API documentation.
Kofax AP Agility organizes SQL connections in connection groups. Connection groups are configured in , and these connection groups are referenced in several other settings where a connection string is required.
It is recommended that you use the ICAL.Invoices.Utils.DBUtils to obtain connections for a connection group. For example, to get a connection to the database that is used for purchase order number validation, you can call,
IDatabaseConnection con =
dbUtils.GetConnectionByGroupName(“PON”,”SQLConnectionGroup”);