Using DbProviderFactory
The CData ADO.NET Provider for DB2 implements the DB2ProviderFactory class to enable you to write generic data access code to DB2 through the ADO.NET base classes.
Creating Data Access Objects with DB2ProviderFactory
The following sections show how to use the DB2ProviderFactory class to create objects like DB2Connection, DB2Command, and DB2DataAdapter in a generic way.
Register and Configure DbConnections
Register the provider to the configuration context and define the DbProviderFactory and DbConnection objects. See Creating DbConnections for a guide.
Querying Using DbCommands
Executing DbCommands describes how to use an existing DbProviderFactory and DbConnection object to execute queries to DB2.