Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-16 Thread Erik de Castro Lopo
Dan Kennedy wrote: > That message is better interpreted as "failed to open some file". > Not necessarily the database file, the same message is returned if > sqlite fails to open or create a journal or temporary file. You were right. I thought I was running as root (I even though I had verified i

Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-16 Thread Erik de Castro Lopo
Dan Kennedy wrote: > That message is better interpreted as "failed to open some file". > Not necessarily the database file, the same message is returned if > sqlite fails to open or create a journal or temporary file. Thanks, thats a useful hint. > First guess is that you do not have permission

Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-16 Thread Dan Kennedy
On Feb 16, 2010, at 7:30 AM, Erik de Castro Lopo wrote: > Erik de Castro Lopo wrote: > >> Hi all, >> >> I've got some relatively simple code that does a query and then >> does the following: >> >>const char *stmt = "DELETE FROM connect WHERE machine = 'xxx';" ; >> >>printf ("Before : %s\n

Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-15 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > Hi all, > > I've got some relatively simple code that does a query and then > does the following: > > const char *stmt = "DELETE FROM connect WHERE machine = 'xxx';" ; > > printf ("Before : %s\n", sqlite3_errmsg (pdb)) ; > sqlite3_exec (pdb, stmt, NULL,

Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-15 Thread Erik de Castro Lopo
Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Erik de Castro Lopo wrote: > > printf ("Before : %s\n", sqlite3_errmsg (pdb)) ; > > sqlite3_exec (pdb, stmt, NULL, NULL, NULL) ; > > printf ("After : %s\n", sqlite3_errmsg (pdb)) ; > > > > The query that happens

Re: [sqlite] Strange sqlite behaviour when calling from C

2010-02-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Erik de Castro Lopo wrote: > printf ("Before : %s\n", sqlite3_errmsg (pdb)) ; > sqlite3_exec (pdb, stmt, NULL, NULL, NULL) ; > printf ("After : %s\n", sqlite3_errmsg (pdb)) ; > > The query that happens before this works as expected and the

[sqlite] Strange sqlite behaviour when calling from C

2010-02-15 Thread Erik de Castro Lopo
Hi all, I've got some relatively simple code that does a query and then does the following: const char *stmt = "DELETE FROM connect WHERE machine = 'xxx';" ; printf ("Before : %s\n", sqlite3_errmsg (pdb)) ; sqlite3_exec (pdb, stmt, NULL, NULL, NULL) ; printf ("After : %s\n", sqli