[IPhone/Android] What should I do if the database size of the import program is different from that of the original database?

Source: Internet
Author: User

I recently made an iPhoneProgram, You need to use the database, so you are too lazy to learn core data, so you simply use the SQLite database.

I used Lita (http://www.dehats.com/drupal? Q = node/58) Create a database, and then use nsfilemanager to copy the database in the project to the document directory in the program sandbox on the device, the database in the sandbox is different from the size of my original database! In a previous post ([Android] How to import an existing external database), someone also replied that there was a problem with the size of the imported database..

So I think there may be a problem with the database, but I have spent a lot of effort to build the database. What should I do?

1. Click Export dB to export the database to an SQL statement.

2. Use sqlite3 to create a new database, and then copy and execute the SQL statement.

 
Sqlite3 dbname. DB


3. Try importing again. No problem. It seems that it is indeed a database problem, and it is difficult to create a manager.

However, the manager must be easier to use than the command line. In the future, use the manager and then use the command.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.