title: creating login page with compering data into sqlite3
body: <p>I am trying to create login page in my application.  For that I am using sqlite database(journeymapper.db3 it is database name) which has UserInformation table 
  For that use the fowling code:</p>
  
  <pre><code> -(void)checkindatabase
  {
  NSString *direct = [[NSString alloc]init] ;
  NSString *dbPath = [direct stringByAppendingPathComponent:@"journeymapper.db3"];
  
  
  if(sqlite3_open([dbPath UTF8String], &amp;database) == SQLITE_OK)
  {
      NSLog(@"open");
      NSString *sql = [[NSString alloc] initWithFormat:@"select Username='%@',Password='%@' from UserInformation",txtuser.text,txtpass.text];
      //[sql UTF8String];
          //NSLog(@"'%s'",[sql UTF8String]);
      sqlite3_stmt *statment;
      if(sqlite3_prepare_v2(database, [sql UTF8String], -1, &amp;statment, NULL) == SQLITE_OK)
      {
           if(sqlite3_step(statment) == SQLITE_ROW)
           {
  
               UIAlertView* alert = [[UIAlertView alloc] initWithTitle:nil
                                                      message:@"Welcome to joureny" delegate:nil 
                                                     cancelButtonTitle:@"OK" otherButtonTitles:nil];
               [alert show];
               [alert release];  
           }
  
  
      }
  
  
      sqlite3_finalize(statment);
  
  }
  sqlite3_close(database);
  }
  
  -(IBAction)login
  {
      [self checkindatabase]; 
  }
  </code></pre>
  
  <p>I am entering right user name &amp; password but it doesn't show me the alertview how can I achieve this.  Please help me on how I can create the login page.</p>