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?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shweta LodhaPosted Jul 17, 2014, 7:22 AM
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 PatilPosted Jul 17, 2014, 8:15 AM
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?