title: sqlite3_prepare_v2 character limit?
body: <p>I have data stored in a sqlite3 database and have several places that I read and write data to and from the database. The problem I am running into is that if the SQL statement gets to be very long the sqlite3_prepare_v2 method returns an error.</p>
  
  <p>This code works:</p>
  
  <pre><code>NSString *strSQL = @"UPDATE commandList SET displayName=?, type=?, formula=?, controlButton=?, sort=? WHERE pk=?;";
  const char *sql = [strSQL UTF8String];
  if (sqlite3_prepare_v2(database, sql, -1, &amp;dehydrate_statment, NULL) != SQLITE_OK) {
      NSLog(@"Error: failed to create update statement with message '%@'.", sqlite3_errmsg(database));
  }
  </code></pre>
  
  <p>But this code errors out:</p>
  
  <pre><code>NSString *strSQL = @"UPDATE commandList SET displayName=?, type=?, formula=?, onFormula=?, offFormula=?, controlButton=?, sort=? WHERE pk=?;";
  const char *sql = [strSQL UTF8String];
  if (sqlite3_prepare_v2(database, sql, -1, &amp;dehydrate_statment, NULL) != SQLITE_OK) {
      NSLog(@"Error: failed to create update statement with message '%@'.", sqlite3_errmsg(database));
  }
  </code></pre>
  
  <p>note the only difference is the 1st line.</p>