Posts
349
Comments
106
Trackbacks
4
Installierte Datenbank-Provider

Falls man wissen möchte welche Datenbank-Provider installiert sind, kann man das folgende Konsolenprogramm ausführen:

using System;

using System.Data;

using System.Data.Common;

 

namespace ConsoleApplication1

{

    class Program

    {

        static void Main()

        {

            DataTable dt = DbProviderFactories.GetFactoryClasses();

 

            Console.WriteLine("Installierte Datenbank-Provider:");

            Console.WriteLine();

            foreach (var s in dt.AsEnumerable())

            {

                Console.WriteLine(s[0]);

            }

 

            Console.ReadLine();

        }

    }

}

posted on Wednesday, December 02, 2009 3:52 PM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 3 and 2 and type the answer here: