title: iphone sqlite problem: "out of memory" on sqlite3_prepare_v2
body: <p>I'm wondering if someone can help me understand what is wrong with this block of code.  I never get past the sqlite3_prepare_v2 statement and the debugger says :</p>
  
  <p>'NSInternalInconsistencyException', reason: 'Error while creating add statement. 'out of memory''</p>
  
  <pre><code>    static sqlite3 *database = nil;
  sqlite3_stmt *addStmt = nil;
  
  if(addStmt == nil) {
      NSLog(@"About to add start time...\n");
      const char *sql = "INSERT INTO games_played(start) VALUES(?)";     
      if(sqlite3_prepare_v2(database, sql, -1, &amp;addStmt, NULL) != SQLITE_OK)
          NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database));
      NSLog(@"add statement created successfully!\n");
  }
  NSLog(@"About to bind start time...\n");
  sqlite3_bind_text(addStmt, 1, @"start time", -1, SQLITE_TRANSIENT);
  </code></pre>