How to send receive data via dialup by Atapi.dll?

217 Views Asked by At

I have a c# project that retrieves data from sql server database and stores in it , and I have a copies of this software every one works in different place (different area ) each software stores in its own database. I have to sync the data among these databases by phone line . I have recently read about atapi.dll . Could I use this dll to make synchronization among databases by send receive data between softwares.

for ex: in the first place i have to send the new records to the other place the first place have a phone number (dial up ex: 1234566) the other place have a number (dial up ex: 3456784) how can send and receive file between two softwares by dialup numbers

2

There are 2 best solutions below

0
Rich Turner On

Writing your own file-sync mechanism may sound simple, but it is not easy, especially if you need to sync multiple parties.

Rather than writing your own sync tool, I would strongly encourage you to use SQL Server replication which is a feature built-in to SQL Server itself to support exactly the scenario you describe above.

If I am understanding your scenario:

  1. You have a master database with all records from all branch sites
  2. You have a subset of that data at each site - the latest copy of the master data plus any changes made at the local site
  3. You periodically want to have each site dial-in to the master server and sync data back and forth so that your site-changes are pushed up to the master server and the master DB's changes are pushed out to the branch DB.

To support this scenario, you just configure your branch offices to dial-into the master office periodically, and configure SQL Server to replicate data as appropriate.

I've previously configured a 25-branch organization to use dial-up and broadband connections to sync a large SQL Server production database in less than 2 days, including time to update their backup strategy to account for the needs of the replication strategy employed.

Compared to writing your own sync engine, using SQL Server replication will likely save you many months' of development effort and many man-years of debugging & operational support!

0
Roger Lipscombe On

You don't want to be dealing with dial-up yourself. Investigate Windows RAS, which sets up a TCP/IP connection between two hosts using dial-up. It can be driven from C#.

Once you've done that, investigate SQL Server Replication in order to sync the data once the connection is up.