CustomDataProvider
------------------
Demonstrate a usage of C1DataObjects with an arbitrary .NET data provider.

This sample shows how C1DataObjects can be used with any .NET data provider
including those not in the list of supported data providers (listed providers are:
OleDb, SqlClient, Oracle, MSOracle). Setting ConnectionType = Custom
(selecting "Custom" when you create a new Connection), you indicate that
you will use a .NET data provider C1DataObjects does not know about.
There are two differences in using a custom (generic) data provider comparing
with using a provider included in the list:

(a) You can't create a whole schema by importing database structure. But you can
    manually define tables one-by-one and retrieve their field from the database structure,
    and, of course, you can manually create relations and data sets.

(b) You need to specify necessary information about the provider, such as its assembly name,
    several type names, etc, in Connection.CustomProviderInfo telling C1DataObjects how
    to use the provider.

Open the Schema Designer, create a new connection selecting "Custom" in the menu
on the Add button in the Connections window. In the connection editor, specify
ConnectionString:

Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Program Files\ComponentOne Studio.NET 2.0\Common\NWind.mdb

Create a new simple table, rename it to "Customers". In the table editor, type
"Customers" in the DbTableName property. Press Retrieve Fields button in the Fields pane.
You will see that Customers fields are retrieved from database structure.
The only adjustment we need is to set PrimaryKey = True for the CustomerID field
(the provider does not return correct primary key information).

Set up a C1DataSet component and a bound grid. Run the sample.


