Reputation: 1897
Is it possible to use some kind of ddl script in SQLiteHelper to create database?
Upvotes: 0
Views: 809
Reputation: 36816
Yes. I usually have a main DB class in my application that encapsulates an inner class that derives from SQLiteOpenHelper. In the onCreate, you get a SQLiteDatabase instance as a parameter. Call db.execSQL(String)
with the appropriate script(s) to create your tables and populate them.
Upvotes: 1