Android SQLite database repair and data export

Source: Internet
Author: User
Tags sqlite database

This morning, I was fixing a database problem. The SQLite database could not be opened, but there was still data in the database. How should I fix this database? My approach is:
First, you need to export the database script. I have performed the following operations through the sqlite3.exe command line tool:

The most important step is to generate an SQL script.
Then, open the script file through SQL Server, which is opened in SQL server2005.
In this process, I am bored with an error, that is, I put all the scriptsCodeI have been admitted to sqliteadmin and want to generate the original database according to the script code. In fact, this is not correct, because the SQLite database in the Android system is somewhat different from the database we generate through the script. Indeed, directly generated databases runProgramAn exception occurred. The correct method is that we can use the Android software we developed to let the software we developed generate an empty database and then export the empty database, copy the data insertion code in the SQL script code to sqliteadmin, and run the statement to generate an error-free database.
The above method is used to complete database repair and data export operations.

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.