Skip to content

Instantly share code, notes, and snippets.

@groggi
Last active August 29, 2015 13:57
Show Gist options
  • Save groggi/d14903f286f45a21110b to your computer and use it in GitHub Desktop.
Save groggi/d14903f286f45a21110b to your computer and use it in GitHub Desktop.
Prints out all OLE DB Providers. Don't forget that some are only available if you run 32 or 64 Bit applications
using System;
using System.Data.OleDb;
namespace OleDbEnum
{
class Program
{
static void Main(string[] args)
{
var reader = OleDbEnumerator.GetRootEnumerator();
while(reader.Read())
{
for (int i = 0; i < reader.FieldCount; i++)
{
Console.WriteLine("{0}: {1}", reader.GetName(i), reader.GetValue(i));
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment