title: SQLite CREATE TABLE and INSERT work, but return SQLITE_ERROR "no such table" C++
body: <p>So this is my first foray into SQLite in C++ and I've got it all working but it's throwing SQLITE_ERROR - "no such table: (tablename)" errors.  I can't figure out what's going on - it shouldn't be throwing those errors when I'm creating a table right? I'm well aware that the table doesn't exist, that's why I'm creating it...</p>
  
  <p>Handler object has a fn. that creates the schema if the tables don't exist:</p>
  
  <p><code>result = handler-&gt;createSchema();</code></p>
  
  <p>Which calls:</p>
  
  <pre><code>bool SQLiteHandler::createSchema()
  {
      if(!isValid())
      {
          return false;
      }
  
      if(schemaExists())
      {
          return false;
      }
  
      //Create necessary table(s)
      std::string query = "CREATE TABLE symbols (id INTEGER PRIMARY KEY AUTOINCREMENT, ticker, last_update, daily_data, minute_data, tick_data);";
  
      dbConn-&gt;executeQuery(query);
  
      if(dbConn-&gt;getStatus() == DatabaseConnector::DBC_SQL_ERROR)
      {
          return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>Which calls (executeQuery(query)):</p>
  
  <pre><code>void SQLiteDBConnector::executeQuery(const std::string Query)
  {
      if(!isConnected())
      {
          return;
      }
  
      //Execute Query
      char* sqlError = 0;
  
      int rc = sqlite3_exec(db, Query.c_str(), NULL, NULL, &amp;sqlError);
  
      if(rc != SQLITE_OK)
      {
          //Error
          std::string err = "[SQLite Error]: ";
          err += std::string(sqlError);
          setStatus(DBC_SQL_ERROR, err);
      }
  
      sqlite3_free(sqlError);
  }
  </code></pre>
  
  <p>Any ideas?</p>