.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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

    At the virtual BlackBerry Technical Seminar 2008, you can ask your development questions directly of Research In Motion® (RIM) experts, and take advantage of learning opportunities designed uniquely for BlackBerry solution developers. Register Today!

    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

    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries
    - Introducing LINQ to SQL Designer using Visua...
    - Beginning LINQ to SQL Using Visual Studio 20...
    - Coding an AjaxPro.NET Based Search Engine fo...
    - Building an AjaxPro.NET Based Search Engine ...
    - Delving Deeper into Serialization with .NET
    - Serialization with .NET

    Iron Speed




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway