Get the available data provider factories : DbProviderFactories « ADO.Net « C# / CSharp Tutorial






using System;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using System.Text;

    class Program
    {
        static void Main(string[] args)
        {
            DataTable tbl = DbProviderFactories.GetFactoryClasses();

            foreach (DataRow row in tbl.Rows)
            {
                Console.WriteLine("{0} ({1})", row["Name"], row["InvariantName"]);
            }
            
        }
    }








32.42.DbProviderFactories
32.42.1.Obtain the DbProviderFactory for SQL Server and create connection from it
32.42.2.Get the available data provider factories
32.42.3.Data Provider Factory