none
Synchronize database between two servers, using a file stored in FlashDisk.. because Internet Connection Not Available.. RRS feed

  • Question

  • Dear All,

    I ask for your opinion.

    I created an Application using VB.Net. It's a Point of Sales application.

    This application is installed on two Notebook, Database of the Application located on each Notebook. Because these two notebooks are in different City. No Internet Connection...

    I want to move data from multiple Tables in the Database, from first Notebook. The data will be stored on storage media, such as FlashDisk..

    Then the data is on the Flashdisk, Will be imported into Apps in Notebook which are in another city.

    If the data I want to move is only on one table, The trick is very easy, I do Query, save to Datatable. Then save it to a CSV File.

    the problem is:

    The data that I will save to Flashdisk, are in different database tables.

    Do I have to create a CSV File, for each table .. if I have 3 tables, do I have to create 3 CSV files?

    Thank you... 


    Friday, July 14, 2017 2:04 PM

All replies

  • https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/bulk-copy-example-setup

    If using MS SQL Server Express, you could use a BulkCopy.

    Do I have to create a CSV File, for each table .. if I have 3 tables, do I have to create 3 CSV files?

    Most would use XML in this situation.

    Friday, July 14, 2017 8:05 PM
  • I am not so sure how BulkCopy works.

    I for one would be concerned about data integrity.

    I agree that XML is the way to go. I would have the datatables in a dataset and iterate the tables in the dataset writing to xml files.

    All my rows would also have a GUID, and during the import I would check the GUID and if it existed I would update rater than insert.


    Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi

    Friday, July 14, 2017 8:34 PM
  • What type of database(s) are you working with?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Friday, July 14, 2017 8:50 PM