using System; using System.Data; using System.Data.OleDb; class TestADO { static void Main(string[] args) { string strDSN = Provider=Microsoft.Jet.OLEDB.4.0;DataSource=c:\test.mdb; string strSQL = INSERT INTO Employee(FirstName, LastName) VALUES('FirstName', 'LastName') ; // create Objects of ADOConnection and ADOCommand OleDbConnection conn = new OleDbConnection(strDSN); OleDbCommand cmd = new OleDbCommand( strSQL, conn ); try { conn.Open(); cmd.ExecuteNonQuery(); } catch (Exception e) { Console.WriteLine(Oooops. I did it again:\n{0}, e.Message); } finally { conn.Close(); } } } //csharp/4120