On 7/29/18, Jürgen Palm <juergen_p...@online.de> wrote:
> Hi,
>
> in an application I encountered a problem, where the changing of the
> structure of a table by dropping and recreating it via one connection to
> a db was not directly seen by another connection to the same db.

Detecting a schema change requires starting a read transaction.  The
sqlite3_step() interface (usually) starts a read transaction, and so
it will detect the schema change, and will cause the statement to
automatically adjust to the new schema.  But sqlite3_column_count()
does *not* start a new transaction.  The sqlite3_column_count() bases
its answer on whatever schema was current during last transaction for
that connection.


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to