I started using the SQLite database in Windows Phone.
And I have a question about select in SQLite database.
/*
List items = null;
items = App.db.Query(“select Nome from Usuario”);
ListBox.ItemsSource = items;
*/
This commented select works to display the data in listbox. That is, I can see if you are saving the data in the database. And you're saving!
BUT I'm trying to do something like this:
// ————
string Email;
Email = App.db.Query(“select Email from Usuario”).ToString();
MessageBox.Show(Email);
//————-
I've tried it too (I've been tempted to):
var returnedCollection = App.db.Query(“select Email from Usuario”);
for (int i = 0; i < returnedCollection.Count(); i++)
{
string email = (returnedCollection[i]).ToString();
MessageBox.Show(email);
}
return;
But it also did not work, only BD.Usuario appears in the MessageBox.