Roger Binns | 6 Mar 2010 00:24

Re: cannot access the sqlite db


Adrian Klaver wrote:
> One of Sqlites quirks is it will spawn empty dbs in any
> path you give it.

That depends on the API used.

  http://sqlite.org/c3ref/open.html

sqlite3_open always opens the database read/write and will create it if
necessary.  sqlite3_open_v2 lets you specify read-only, creation, mutex and
caching behaviour.  It was added in late 2007.

pysqlite remains backwards compatible with older SQLite versions hence
constrained to the older api behaviour.  APSW gives you the newer API usage
and behaviour.

Roger
Greg Milby | 6 Mar 2010 00:26
Picon

Re: cannot access the sqlite db

Roger, that was informative. i read the sqlite site almost twice through today, and i did not see that. Thanks,Greg
-----------------------
Visit My Sites!
http://1-4-u.info | Don't send insanely long links!
www.syrbot.com | My Site
www.syrbotwebdesign.com | My Site New Design (Under Construction)
www.attackr.com | Latest Blog Posts
www.superantispyware.com/superantispyware.html?rid=3971 Remove All The Spyware - Not Just The Easy Ones!



On Fri, Mar 5, 2010 at 6:24 PM, Roger Binns <rogerb <at> rogerbinns.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian Klaver wrote:
> One of Sqlites quirks is it will spawn empty dbs in any
> path you give it.

That depends on the API used.

 http://sqlite.org/c3ref/open.html

sqlite3_open always opens the database read/write and will create it if
necessary.  sqlite3_open_v2 lets you specify read-only, creation, mutex and
caching behaviour.  It was added in late 2007.

pysqlite remains backwards compatible with older SQLite versions hence
constrained to the older api behaviour.  APSW gives you the newer API usage
and behaviour.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkuRkscACgkQmOOfHg372QSDQACfSncSR4lwGr7wFU4TM+qn/Ko0
Oz0AnAkf1TnDC/xXOyxwpmjbEZgOkLWV
=+Tel
-----END PGP SIGNATURE-----


Gmane