dimanche 30 août 2015

create local db table structure using remote db and get all data

I have a database already defined in remote database (MySQL), it contains only 50 tables and it can be increased when user add some new classes on server side.

Part of my function is to write an Android application that will be checking if the local db existed or not, if not , it will create the table based on the remote's db table structure into sqlite, and if existed then fetch the newly added tables and any changes of other tables. I want to make like this one control panel. The problem is, how can I create a table same as the one in my remote database without hard coding the sql statement. How can I do this?

Aucun commentaire:

Enregistrer un commentaire