PDA

View Full Version : Good practices for export<->import SQLite datas



oscar
7th December 2008, 14:17
Hi,

I'm looking for an elegant way to do the following tasks:

I have a software storing "customers" in a local sqlite database and I want to export some of them and their related records to other people having the same software remotely.

I've thought of many ways to do it, but it always needs a lot of hand coding and it's not flexible...
What would be the best way to do it taking into account the functionnalities ofQt?

Here's my actual way to do it:

I manually generate an XML file by requesting all the related tables and records of the customer.
Then I send the XML file to the server by calling a POST method in an PHP script.
The server stores temporary the datas until the aiming client asks for new datas.

The aiming client then downloads the XML file, converts it then stores it in his local sqlite database. This tasks also involves a lot of checks because a customer and his related tables can already be listed in the local database with other ids, some fields may have changed... so I must gather all the changes and propose each of them to the user who will accept it or not...
Quite a long task to achieve... So I would be interested in good practices to achieve it.

Best regards,
Oscar.

talv
8th June 2009, 04:24
Hi,

Did you find a better way of doing this, im kind of in a similar situation with exporting numerous fairly large datasets over an SSL connection using a client / server model and a mysql database. im not entirely sure how to approach the task at hand. ive set up the ssl connection properly using QsslSockets and QTcpServer and performed simple queries to db but when it comes to a dynamic set of data produced by some fairly complex queries im not so sure, so Id love to hear any good coding practises with regards to network programming if anyone has any!

thanks!

Talv