) – Ben Aug 12 '12 at Your code is not working fine because it's not doing what you're talking about. NO_DATA_FOUND exception in the case of unmatched records.
The IF condition to evaluate if it's the case to insert the records is wrong because it would insert only new duplicates.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site.
If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.
Make sure to add all the fields you will need to the update cursor.
fields = (ID_fld,file_nm_fld,path_fld) updt_cursor =
We will need to create three layouts for our project Layout 1: activity_This layout holds all the records and an Add button to add records.
When there are no contacts, we are showing the “No Records” and when user inserts the data, we hide that section.
Layout 3: table_This xml file for two DML (Data Manipulation Language – used for insert/ update/ delete queries) statements of SQLite Database i.e. Here, we have two fieds: public class SQLite Helper extends SQLite Open Helper We are creating a java file called SQLite Helper and extending SQLite Open Helper class and It is used to create a bridge between android and SQLite.
The final output should look something like following: [SCREENSHOT – FIRST SCREEN] As you can see from the screenshots above initially user will see a list (which would be empty right now, since there are no records) and button called ‘Add‘.
[SCREENSHOT – SECOND SCREEN] When user press the Add button, we’ll show him the form where user can add two fields [SCREENSHOT – FIRST SCREEN AFTER ADDING THE RECORD] By clicking the Insert button, record will be saved into SQLite database and user can see added record on the first screen.