I've noticed in more than one SQLite tutorial that the table is recreated in the onCreate()
event of the class that extends SQLiteOpenHelper
. I've already created my SQLite database and tables outside the Android environment (Eclipse IDE) with the help of a Firefox add-in. The database tables reside in the expected spot:
C:\aXX3&Space\Android\workspace\OnDemandAndAutomatic_Project\assets
It seems bizarre to me that I would have to recreate them programmatically each time (obviously, they continue to exist and retain data, or what would be the point)? However, I'm having a serious issue with this application right now which leads me to my question:
- Is it really necessary reminding Android every time about the database?
Much to my chagrin, I just realized that instead of creating my database tables in C:\aXX3&Space\Android\workspace\OnDemandAndAutomatic_Project\assets
, I had put them in C:\aXX3&Space\Android\workspace\OnDemandAndAutomatic\assets
, which was an earlier version of the application, yet copying the SQLite file to the proper location didn't change things a single bit. If this is what has been causing the problem, being that my application was looking for an AWOL database, is it not enough to simply copy and paste the file? Must I do something to officially
introduce the database to the system/Android/Eclipse
directory? Any suggestions?