Team LiB
Previous Section Next Section

Additional Data Providers

There are more data providers than just the two just covered. The beauty of the data provider system is that the interfaces required to implement a data provider are part of the .NET Framework itself. This means that any vendor that wants to create a managed wrapper around their own data source can do so quickly and easily using the established interfaces and guidelines for data access. As a result, many different providers have popped up and more are appearing every day.

The Oracle .NET Data Provider (ODP.NET)

Oracle has created its own managed provider that exposes all the Oracle client functionality that you might expect, as well as some extra bonuses such as the ability to use cursors as parameters to stored procedures and much more. The benefit of having a managed provider developed directly by the product vendor is that, in general, you get a richer API with more functionality and possibly better performance. In most cases, there hasn't been much visible difference in speed between Oracle's data provider and Microsoft's data provider for Oracle. Both of those managed providers make use of OCI (Oracle Call Interface), the low-level C-based API that allows for the fastest consumption of Oracle features. The main difference between the two providers is in the depth of their functionality.

The Microsoft .NET Data Provider for Oracle

With the release of version 1.1 of the .NET Framework, programmers are now able to reference System.Data.OracleClient.dll, Microsoft's own OCI client implemented as a managed provider for .NET. This provider gives you access to a host of features such as transactions, CLOBS, BLOBS, and many more. As mentioned earlier, it is up to you whether you choose Oracle's provider or Microsoft's provider. They are functionally quite similar, so it probably boils down to choosing the support you want: Oracle's or Microsoft's.

The .NET ODBC Data Provider

The ODBC data provider is a wrapper for the older database connectivity standard ODBC (Object Database Connectivity). The ODBC provider used to be an optional download, but it is now included with the 1.1 version of the .NET Framework. The only real guideline for using ODBC is that you should use it as a last resort. If there is any other way to get at your data, you should use that. If you can use OLEDB, SQL, Oracle, or even XML, you should use one of those methods in favor of the older, slower, and less reliable standard. Most companies no longer provide updated ODBC drivers, so you might be putting your code at risk by relying on ODBC. However, for backward compatibility and for getting at outdated sources of data, the ODBC provider is available if you need it. It implements all the appropriate provider interfaces so it should be very easy to pick up and use.

The mySQL .NET Data Provider

mySQL is a popular (free) database that is used on Unix and Windows systems alike. It is an extremely powerful, fast alternative to some of the bigger commercial databases, such as Microsoft SQL Server and Oracle.

Several different managed providers allow managed access to mySQL from the .NET Framework, including some commercial projects and a free provider found on SourceForge. A project on, formerly referred to as ByteFX.Data, has been merged with the mySQL project and is now the official managed client provider for mySQL. You can find updates on this project on the website. You can keep up to date on the latest news from the site at

    Team LiB
    Previous Section Next Section