title: Reverting data using sqlite
body: <p>I have been staring at this code for a while now. Researching alternatives but they dont seem to work. Please tell me that i have looked over something little.</p>
  
  <pre><code>-(void)revertData
  {   
  if(revertStmt == nil) {
      const char *sql = "select signature, sigdate from signatureDB where id = ?";
      if(sqlite3_prepare_v2(database, sql, -1, &amp;revertStmt, NULL) != SQLITE_OK){
          UIActionSheet *msg = [[UIActionSheet alloc] 
                                initWithTitle:[NSString stringWithFormat:@"Error while inserting data. '%s'", sqlite3_errmsg(database)] 
                                delegate:nil 
                                cancelButtonTitle:nil  destructiveButtonTitle:nil 
                                otherButtonTitles:@"Okay", nil];
          [msg showInView:[UIApplication sharedApplication].delegate.window];
      }
  }
  
  sqlite3_bind_int(revertStmt, 0, myID);
  
  if(SQLITE_DONE == sqlite3_step(revertStmt)) {
  
       self.signature = [NSString stringWithUTF8String:(char *)sqlite3_column_text(revertStmt, 0)];
       self.sigdate = [NSString stringWithUTF8String:(char *)sqlite3_column_text(revertStmt, 1)];
  }
  sqlite3_reset(revertStmt);
  
  }
  </code></pre>