nagaraj m

nagaraj m

  • NA
  • 25
  • 3.6k

How to use Sqlite DataReader in windwos phone 8 using sqlite

Jul 1 2013 1:08 AM
Hi i am using windows phone 8 app. i have to check valid user in my table, so am using sqlite datareader.but i am facing some issue given below.
 
    protected override void OnNavigatedFrom(NavigationEventArgs e)         {             if (dbConn != null)             {                 /// Close the database connection.                 dbConn.Close();             }         }         private void Click_Login(object sender, RoutedEventArgs e)         {             dbConn = new SQLiteConnection(DB_PATH);             SQLiteCommand sqCommand = new SQLiteCommand(dbConn);             if (txtEmailaddress.Text != "")             {                 sqCommand.CommandText = "SELECT * FROM Task Where Email=" + "\'" + txtEmailaddress.Text + "\'" + "and Password=" + "\'" + txtPassword.Password + "\'";                 sqCommand.ExecuteNonQuery();                  SQLiteDataReader reader = sqCommand.ExecuteReader();// exeception throws here                              }                      }

I am using Visual Studio 2012. Please help me how to solve in this issue


Answers (23)