0

I tried few day of how to synchronize database from Ms. Access 2007 64bits to SQL Server 2008 64bits, But it has no the possible solution. So now I want to create the Window Service to check whether having the new record i insert to MS. ACCESS or not, If there are the new records insert, then they will tell the SQL Server to insert all those records to its record also. I created one solution with 2 projects : This is the main project :

using System.ServiceProcess;
using System.Text;

namespace AutoSync
{

  public partial class Thread : ServiceBase
  {
      public Thread()
      {
         InitializeComponent();
      }
      protected override void OnStart(string[] args)
      {
      }
      protected override void OnStop()
      {
      }
   }
 }

And the second project is Service Setup. What I want to try now is, create another class of C#, that check the Ms. Access record, and then pass all the new record that has been inserted to SQL Server. Could anyone give me any idea about that.

Thanks in advanced.

dsolimano
  • 8,870
  • 3
  • 48
  • 63
Nothing
  • 2,644
  • 11
  • 64
  • 115

1 Answers1

1

You probably want to use this kind of approach to run your business logic i.e. at a specific time of the day.

Have a look at detailed instructions for setting up your service here.

Next you want to work out connectivity to MS Access and SQL Server, and work on the business logic for the sync. This should probably happen at a set time or time(s) during the day, or you could poll at given intervals using Timer class as shown in the link I provided above.

You will initiate this business logic in the OnStart method of your service.

Community
  • 1
  • 1
Zaid Masud
  • 13,225
  • 9
  • 67
  • 88