-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/10/11 08:25, Tim Streater wrote:
> Looking at the description text for sqlite3_exec (SQLite C interface),
> I see this text:

That interface is generally not used.  I believe it dates from the days of
SQLite 2.  It provides all values as strings, and gives all the results in
one go hence consuming a lot of memory.

The interface that is used is:

- - sqlite3_prepare() to get a stmt for the first SQL statement
- - sqlite3_step() to process up to the next row or end of results for that stmt
- - sqlite3_value_int/blob etc to get each column of a result row
- - sqlite3_finalize when done with the stmt

If there was more than one SQL statement then the developer needs to go
back to the prepare step passing in the next statement.  This is what some
developers leave out.

If you look in the SQLite source you'll find that sqlite3_exec is pretty
much a wrapper around the above.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6TEEcACgkQmOOfHg372QQ7NQCfVxKnkCPkbenBaxNdtHbcHS70
CssAoJsn1nsc05SXokHukAVgEnPBI3Ic
=PHRl
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to