using System; using System.Data; using System.Data.OleDb; class TestADO { static void Main(string[] args) { string strDSN = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\test.mdb; string strSQL = SELECT * FROM employees ; OleDbConnection conn = new OleDbConnection(strDSN); OleDbCommand cmd = new OleDbCommand( strSQL, conn ); OleDbDataReader reader = null; try { conn.Open(); reader = cmd.ExecuteReader(); while (reader.Read() ) { Console.WriteLine(First Name:{0}, Last Name:{1}, reader, reader); } } catch (Exception e) { Console.WriteLine(e.Message); } finally { conn.Close(); } } } //csharp/4117