An error occurred while creating the database for SQLite.
1. symptom: the database cannot be created,
Solution: The project package for testing ends with db, and it will be okay to recreate the project and change it to dbtest.
2. symptom: the database is created, but there are no table items in the database.
Solution:
Db.exe cSQL ("create table" + TABLE_NEWS_NAME + "(" + TABLE_NEWS_ID + "integer primary key autoincrement," + TABLE_NEWS_TITLE + "varchar (50 ), "+ TABLE_NEWS_SUMMARY +" char (50 ));");Note that you must add a space in the quotation marks at the end of create table. Otherwise, an error will be reported when the table name and table name are serialized. This error is concealed by other parties !!
How can I create a database in sqlite?
Use sqlite3 d:/test. db before going to sqlite>
C: \ Windows \ system32> sqlite3 test. db
Android SQLite database creation Problems
Is your SQL incorrect? The varchar behind the password does not have a defined size, and there are also half of the brackets missing. Why not inherit SQLiteOpenHelper to create it directly?