質問

I'm creating a software in c++ with Qt library where the database is loaded when you log in to the software. When it's done you can use it without connection and edit your database, then when you have internet access you can update your online database.

How can I do that ?

  • Write it into a file with my own format and then parse and do the mysql request when I have internet connection ?
  • Use a database with localhost and then copy it to the real one ?
  • An other solution ?

When two users update their database offline, how can I check they don't use the sameId ? By the way I need the ID as father/son elements.

Thanks.

役に立ちましたか?

解決

I found a good solution which is to use a sqlite database in my C++ program.

So I have the same requests in both directions ("Upload", "Download") and access to all my data in the whole program (use of singleton for database access)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top