using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
publicclass MainClass {
publicstaticvoid Main(){
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Northwind.mdb";
OleDbConnection conn = new OleDbConnection(ConnectionString);
try
{
conn.Open();
}
catch(OleDbException ae)
{
for (int i = 0; i < ae.Errors.Count; i++)
{
Console.WriteLine(ae.Errors[i].Message + " - " + ae.Errors[i].SQLState);
}
}
}
}