title: Sqlite c++ ATTACH memory database
body: <p>I try to attach in memory db to an existing db connection via c++ api like this:</p>
  
  <pre><code>void InMemoryDbtest(){
      sqlite3 *db;
      int rc = sqlite3_open("E:/VS_workspace/ConsoleSQLITE/Debug/TPCH.sqlite", &amp;db);
      if (rc){
          cout &lt;&lt; "nie moge otworzyc bazy danych ";}
      else{
          cout &lt;&lt; "otwarcie bazy ---- udalo sie\n";}
      char *err;
  
  sqlite3_exec(db, "ATTACH DATABASE 'file::memory:?cache=shared' as pom",0,0,&amp;err);
  
      cout &lt;&lt; "error" &lt;&lt; err &lt;&lt; endl;
      string q = "create table pom.bla as select n_name from NATION ";
      sqlite3_exec(db, q.c_str(), 0, 0, &amp;err);
      cout &lt;&lt; "error" &lt;&lt; err &lt;&lt; endl;
  }
  </code></pre>
  
  <p>I get 2 error messages"</p>
  
  <p>unable to open database: file:memory
  and
  unknown database pom</p>
  
  <p>Any ideas? When i try to attach db in sqlite console everything works just fine</p>