ADO Net C# Tutorial

using System;
using System.Data;
using System.Data.OleDb;
    class Program
    {
        static void Main(string[] args)
        {
            string oledbConnectString =
                "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Northwind2007.accdb;";
            using (OleDbConnection connection = new OleDbConnection(oledbConnectString))
            {
                connection.Open(  );
                Console.WriteLine("Connection State: {0}", connection.State);
                Console.WriteLine("OLE DB Provider: {0}", connection.Provider);
                Console.WriteLine("Server Version: {0}", connection.ServerVersion);
            }
        }
    }