Is it necessary to extends SQLiteOpenHelper.I just want to copy the database(read only) from aseets folder.
Is it necessary to extends SQLiteOpenHelper.I just want to copy the database(read only) from
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is not necessary to extends SQLiteOpenHelper,To create and upgrade a database in your Android application you usually subclass “SQLiteOpenHelper”. In this class you need to override the methods onCreate() to create the database and onUpgrade() to upgrade the database in case of changes in the database schema. Both methods receive an “SQLiteDatabase” object.
SQLiteOpenHelper provides the methods getReadableDatabase() and getWriteableDatabase() to get access to an “SQLiteDatabase” object which allows database access either in read or write mode.
For the primary key of the database you should always use the identifier “_id” as some of Android functions rely on this standard.