Difference between revisions of "Teams Winter 2011/team1/BlackBerry/Use SQLite"
Ladanzahir (talk | contribs) (→11.1 Add SDCard to Simulator) |
Ladanzahir (talk | contribs) (→11.1 Add SDCard to Simulator) |
||
Line 4: | Line 4: | ||
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... .<br/> | 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... .<br/> | ||
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.<br/> | 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.<br/> | ||
− | [[Image: BB_SDCard.png | | + | [[Image: BB_SDCard.png | 350px]]<br/> |
===11.2 Create Database File=== | ===11.2 Create Database File=== |
Revision as of 21:21, 11 April 2011
Contents
- 1 11. Use Database and SQLite to Store Data
- 1.1 11.1 Add SDCard to Simulator
- 1.2 11.2 Create Database File
- 1.3 11.3 Add id to Student Class
- 1.4 11.4 Check for presence of SDCard
- 1.5 11.5 Copy Database File into SDCard
- 1.6 11.6 Create SQLiteManager Class
- 1.7 11.7 Modify StudentsList Class to use SQLiteManager
- 1.8 11.8 Student View Application in Action
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