-2

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

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • 1
    Can you add a specific example of how you've tried to use this library, or what research you have done in attempting to use this library? Read https://stackoverflow.com/help/mcve to see how to write a question that is likely to receive an answer. – Steve Mitcham Jan 20 '15 at 18:44
  • atapi has a property called object . so I think i can send and receive files by assigning the File to this property . but if there is another way please tell me – Mohammad Abdullah Jan 20 '15 at 18:47
  • this same question was asked 2 days ago, was closed because it was `too broad` and yet you did not provide any useful information in my opinion. also have you tried looking at the `API's` documentation.. show us what you have tried vs waiting on someone to provide you with an answer without seeing what coded efforts you have tried and or are faced with.. – MethodMan Jan 20 '15 at 18:48
  • please help me and don't be tough . i don't have enough points to add images for explaining my point well – Mohammad Abdullah Jan 20 '15 at 18:52
  • do you know a way to send and receive file by dial up phone lines? – Mohammad Abdullah Jan 20 '15 at 18:54
  • please could you tell me a way to start and research from ? – Mohammad Abdullah Jan 20 '15 at 18:57
  • Ignore ATAPI.DLL. Read about the [`SerialPort` class](http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx). And be very careful about what ancient stuff you read about on the Internet. – John Saunders Jan 20 '15 at 19:12
  • thanks Mr John . I appreciate your polite answer . can i send and receive a file from specific dial number to another dial up phone number by serial port class? – Mohammad Abdullah Jan 20 '15 at 19:23

2 Answers2

1

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!

Rich Turner
  • 10,800
  • 1
  • 51
  • 68
1

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.

Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380