Teams Winter 2011/team1/BlackBerry/Use SQLite
11. Use Database and SQLite to Store Data
11.1 Add SDCard to Simulator
To be able to have data preserved on database, first we need to make sure that simulator can simulate SDCard, so that we can run our application with database. For this purpose first create a folder on your file system. Then run the simulator and from the top menu choose: Simulate > Change SD Card... .
Then Mount Directory, and select the folder you just created. Every time you restart the simulator, before running the app you need to make sure that the folder is mounted as SD Card. later on you will see that the database file gets created there.
11.2 Create Database File
11.3 Add id to Student Class
11.4 Check for presence of SDCard
11.5 Copy Database File into SDCard
11.6 Create SQLiteManager Class
11.6.1 Open Database
11.6.2 Close Database
11.6.3 Select All Students
11.6.4 Insert New Student
11.6.5 Delete Student
11.6.6 Update Student
11.7 Modify StudentsList Class to use SQLiteManager
11.7.1 Load list
11.7.2 Add Student
11.7.3 Edit Student
11.7.4 Delete Student