Chapter 28. Creating a Custom ADO.NET Data Provider

IN BRIEF

As you saw in the previous chapter, using the ADO.NET data providers gives you a consistent user experience, whether you're connecting to some OLE DB data source, SQL, Oracle, or even an ODBC data source. The goal of the consistent data provider model is that programmers need to learn to use only one set of interfaces, regardless of which database they are accessing.

You've seen it from the consumer point of view, and this chapter will show you ADO.NET data providers from the perspective of the data provider. In this chapter, you will see a lot of code for creating your own custom data provider. In addition to the code for a custom provider, you will also see the details on all the interfaces required to implement a provider, as well as guidelines for when you should and should not implement your own custom provider.

WHAT YOU NEED

REQUIRED SOFTWARE.NET Framework SDK v1.1 VSVisual Studio .NET 2003 w/with C# Installedinstalled
RECOMMENDED HARDWAREPC that meets .NET SDK minimum requirements
SKILLS REQUIREDC# and .NET Familiarityfamiliarity Familiarity with web services (see Chapters 18 and 32)

CREATING A CUSTOM ADO.NET DATA PROVIDER AT A GLANCE

Custom Data Providers555  
 When to Create a Data Provider555Sample Data Provider Scenario556
 Steps for Implementing a Custom Data Provider556Overview of the Remote Data Provider557
Implementing IDataParameter and IDataParameterCollection558  
 The IDataParameter Interface558The RDPParameter Class559
 The IDataParameterCollection Interface559The RDPParameterCollection Class563
Implementing a Custom Connection565  
 The IDbConnection Interface566The RDPConnection Class566
Implementing a Custom Command569  
 The IDbCommand Interface569The RDPCommand Class570
Implementing a Custom DataReader575  
 The IDataReader Interface575The RDPDataReader Class576
Implementing a Custom DataAdapter DataAdapter582  
 The IDbDataAdapter Interface582The RDPDataAdapter Class582
Summary587  

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.122.235