Access.Application acApp = new Access.ApplicationClass();//create msaccess applicationacApp.OpenCurrentDatabase(@"\\d1fil002\sps\DB\NOSY\Tactical\test.mdb",false,null);//open mdb fileobject oMissing = System.Reflection.Missing.Value; object rt = acApp.Run("UpdateNCVC"); acApp.Quit(Access.AcQuitOption.acQuitSaveNone);//exit application
using Access = Microsoft.Office.Interop.Access;
INSERT INTO tblNCVCData ( Ref, SBI, Version, Reason, Outome, [QC Result], [2005 Currency], [2005 Value], [2006 Currency], [2006 Value], [2007 Currency], [2007 Value], [2008 Currency], [2008 Value], [2009 Currency], [2009 Value], [2010 Currency], [2010 Value], [2011 Currency], [2011 Value], [2012 Currency], [2012 Value], [Staff ID], [Updated Date], [Duplicate 1], [Duplicate 2] )SELECT tblNCVC.Ref, tblNCVC.SBI, tblNCVC.Version, tblNCVC.Reason, tblNCVC.Outome, tblNCVC.[QC Result], tblNCVC.[2005 Currency], tblNCVC.[2005 Value], tblNCVC.[2006 Currency], tblNCVC.[2006 Value], tblNCVC.[2007 Currency], tblNCVC.[2007 Value], tblNCVC.[2008 Currency], tblNCVC.[2008 Value], tblNCVC.[2009 Currency], tblNCVC.[2009 Value], tblNCVC.[2010 Currency], tblNCVC.[2010 Value], tblNCVC.[2011 Currency], tblNCVC.[2011 Value], tblNCVC.[2012 Currency], tblNCVC.[2012 Value], tblNCVC.[Staff ID], tblNCVC.[Updated Date], tblNCVC.[Duplicate 1], tblNCVC.[Duplicate 2]FROM tblNCVCWHERE (((tblNCVC.Reason)="Manual Payment"));