How to create the database and add append new data and view & delete the data one by one using SQLite in Windows Phone?
Can anyone tell me, the code to create New database from start to end?
Create, Add, View & Delete data using SQLite Windows Phone?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Shweta LodhaRank #31 · 39.8K reputationPosted Jul 17, 2014, 3:22 AM EDT
protected override void OnNavigatedTo(NavigationEventArgs e)
{
/// Create the database connection.
dbConn = new SQLiteConnection(DB_PATH);
/// Create the table Task, if it doesn't exist.
dbConn.CreateTable<Task>();
/// Retrieve the task list from the database.
List<Task> retrievedTasks = dbConn.Table<Task>().ToList<Task>();
/// Clear the list box that will show all the tasks.
TaskListBox.Items.Clear();
foreach (var t in retrievedTasks)
{
TaskListBox.Items.Add(t);
}
}
Complete code is given over here :
http://developer.nokia.com/community/wiki/How_to_use_SQLite_in_Windows_Phone
Aditya PatilRank #2,485 · 565 reputationPosted Jul 17, 2014, 4:15 AM EDT
Don't you think this is too complex for beginner.
I got another link, http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=642845&av=940979 Simplest code but for that we have to add the 'SQLiteWinRTPhone' with 'SQLite for Windows Phone' But I am not able to add this 'SQLiteWinRTPhone', Can you help me regarding it, Its showing Project can't load properly.
What am I do?