title: getting error as there is at least one open result set around after performing [FMDatabaseQueue inDatabase:]?
body: <p>In my app, there are multiple threads accessing the database. I have used the SQLite wrapper FMDB. </p>
  
  <p>I heard that FMDB provide me us to handle multithreading via FMdatabaseQueue. </p>
  
  <p>Due to that, I have used it like below:</p>
  
  <pre><code>@property (nonatomic, strong) FMDatabaseQueue *queue;
  
  _queue = [[FMDatabaseQueue alloc] initWithPath:path];
  
  
  - (BOOL)deleteSchoolDatabase:(NSString *)name anduserId:(NSString*)studentId {
  
      __block BOOL success = NO;
  
      [self.queue inDatabase:^(FMDatabase *db) {
  
          NSString *deleteStudentDBString = [NSString stringWithFormat:@"DELETE FROM user WHERE name=%@ AND studentId=%@",name,studentId,nil];
  
          success = [db executeQuery:deleteStudentDBString];
  
          NSAssert((![db hadError]), [db lastErrorMessage]);
  
          if ([db hadError]) {
  
              DebugLog(@"Error : %@", [db lastErrorMessage]);
              success = NO;
          }
  
      }];
  
      return success;
  }
  </code></pre>
  
  <p>I Have used above format for fetching as well i.e</p>
  
  <pre><code>[self.queue inDatabase:^(FMDatabase *db) {
            //fetch details
  }];
  </code></pre>
  
  <p>But now I am getting error as </p>
  
  <pre><code>Warning: there is at least one open result set around after performing [FMDatabaseQueue inDatabase:]
  query: 'DELETE FROM user WHERE name='abc' AND studentId='12346';'
  </code></pre>
  
  <p>I have also checked out below links:
  <a href="https://groups.google.com/forum/#!topic/fmdb/oeu38he7UvQ" rel="nofollow noreferrer">https://groups.google.com/forum/#!topic/fmdb/oeu38he7UvQ</a></p>
  
  <p>and I think I am closing the set once done. still, the error is occurring. 
  and this is happening for one table only. In other table are able to delete data from Database.</p>
  
  <p>Thanks in advance.</p>