On Thu, 4 Jul 2013 15:15:14 -0400, "James K. Lowden" <jklow...@schemamania.org> wrote:
> This weird case is one of (I would say) misusing the connection. IMO > SQLite should return an error if prepare is issued on a connection for > which a previous prepare was not finalized or reset. That would > forestall discussions like, this and prevent confusion and error. Not the _prepare() is critical, but the first call of_step() after _prepare() or _reset(). In fact it is a nice feature to prepare (a whole bunch of) statements in advance (which runs the optimizer and generates the code for the virtual machine) and reuse them (with different bindings). Every use (AKA statement execution) is: loop _bind() _step() ... other stuff endloop _reset() At program init: _prepare() At program exit: _finalize() Re-prepare() is only necessary when the schema changes, and can be automatic in some versions of _prepare(). In most applications the schema is quite static. my EUR 0.02 -- Groet, Cordialement, Pozdrawiam, Regards, Kees Nuyt _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users