.NET
  Home arrow .NET arrow The Provider Factory in ADO.NET 2.0
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

The Provider Factory in ADO.NET 2.0
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 7
    2006-08-09

    Table of Contents:
  • The Provider Factory in ADO.NET 2.0
  • Data Providers on This Machine
  • More Data Providers on This Machine
  • Creating Provider Independent Data Access

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Provider Factory in ADO.NET 2.0


    (Page 1 of 4 )

    The provider factory object in ADO.NET 2.0 lets you create commands for data that are independent of the database in which it is stored. If you want to learn more about this very useful item, keep reading.

    Different database products have different providers. If the connection string and the provider can be disassociated, then the provider information can be stored in a central location such as the Machine.config file. This came into being with ADO.NET 2.0. Since there are many providers (MS SQL, Oracle, SQL Anywhere, and so on), they form a collection which can be interrogated at run time and modified at runtime. The provider factory object then provides support to create connections, commands, and data adapters that are independent of the underlying database. This tutorial looks at the abstract provider factory as described in ADO.NET 2.0.

    What is the Provider Factory?

    In order to get a basic understanding of the enhanced architecture of ADO.NET let us start a new Asp.NET web site project, Factory in VS 2005 using the installed template as shown in the next picture.

    Since the Provider Factory is a generic model applicable to all data sources, it is found in the System.Data.Common namespace. After setting the reference to this by using the imports statement, the DbProviderFactories object's properties and methods can be seen in the object browser as shown in the next picture. This shows that you can access the DbProviderFactory using the GetFactory() methods. In the next section we will look at all the DbProviderFactories available on this machine.

     

    More .NET Articles
    More By Jayaram Krishnaswamy


       · Yes, that is true, more power with less coding. In an earlier tutorial,'Using the...
     

    .NET ARTICLES

    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek