title: sqlite error 14 [unable to open database file] iphone xcode
body: <p>Hi i am using database in iphone. After along time, My application gave this error </p>
  
  <pre><code>sqlite error 14 [unable to open database file] 
  </code></pre>
  
  <p>My application is going good but some times it generates the above error.What is the solution? 
  There is the code:</p>
  
  <pre><code>[lovkid openDatabase:[appDelegate getDBPath]];
  NSString *Flag = [NSString stringWithFormat:@"%@", appDelegate.selectimage];
      int recId = (int)appDelegate.Id;
      NSLog(@"recID = %d",appDelegate.Id);
  
      updateStmt1 = nil;
      if(updateStmt1 == nil) 
      {
  
          const char *sql ="UPDATE 'char' SET `Pic`=? WHERE `id`=?";
          if(sqlite3_prepare_v2(database1, sql, -1, &amp;updateStmt1, NULL) != SQLITE_OK)
              NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database1));
      }
      sqlite3_bind_text(updateStmt1, 1, [Flag UTF8String], -1, SQLITE_STATIC);
      sqlite3_bind_int(updateStmt1, 2, recId);
  
      if(SQLITE_DONE != sqlite3_step(updateStmt1))
          NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database1));
      else
          NSLog(@"no error");
  
  
  
      sqlite3_reset(updateStmt1);
      sqlite3_finalize(updateStmt1);
  </code></pre>
  
  <p>...</p>