title: SQLite iOS Insert data
body: <p>Im trying to insert just one name to my sqlite file. im using this code but it's not working :/ </p>
  
  <pre><code>-(void)InsertRecords:(NSMutableString *) txt{
      if(addStmt == nil) {
          const char *sql = "INSERT INTO myMovies (movieName)  VALUES(?) ";
          if(sqlite3_prepare_v2(database, sql, -1, &amp;addStmt, NULL) != SQLITE_OK)
              NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database));
          else
              sqlite3_bind_text(addStmt, 1, [txt UTF8String], -1, SQLITE_TRANSIENT);
      }
      if(SQLITE_DONE != sqlite3_step(addStmt))
  
          NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database));
      else
          sqlite3_reset(addStmt);
  }
  </code></pre>