CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2018
    Posts
    2

    Duel database fact for a java app

    Is there any way to use duel database for a Java app? Default db will store in local PC, another one will remote online server, application should have an option "Sync to online" after got the command click all local data will Sync with online db.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Duel database fact for a java app

    Sure use something like a guid as the primary key in the table (to avoid conflicts when syncing).

    There are many strategies for syncing the data. One is to always write to the local database and have a background thread which syncs the records. The thread can he started by a button click. You can track a synced record in the local db by adding a column like a datetime column - just insert the current date/time when the record was sucessfully synced. The background thread will sync records that don't have the sync datetime column set.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured