Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-29 Thread Adam DeVita
Thanks for the clarification. Adam On Sat, Oct 27, 2012 at 12:13 PM, Simon Slavin wrote: > > On 27 Oct 2012, at 6:36am, Dan Kennedy wrote: > >> On 10/27/2012 07:06 AM, Simon Slavin wrote: >>> >>> On 26 Oct 2012, at 11:05pm, Clemens

Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-27 Thread Simon Slavin
On 27 Oct 2012, at 6:36am, Dan Kennedy wrote: > On 10/27/2012 07:06 AM, Simon Slavin wrote: >> >> On 26 Oct 2012, at 11:05pm, Clemens Ladisch >> wrote: >> >>> Yes; sqlite3_finalize _always_ frees the statement. >> >> And if the statement is already

Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-26 Thread Dan Kennedy
On 10/27/2012 07:06 AM, Simon Slavin wrote: On 26 Oct 2012, at 11:05pm, Clemens Ladisch wrote: Yes; sqlite3_finalize _always_ frees the statement. And if the statement is already finalized (due to an earlier error, perhaps) then it is a harmless noop. So you can do it

Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-26 Thread Simon Slavin
On 26 Oct 2012, at 11:05pm, Clemens Ladisch wrote: > Yes; sqlite3_finalize _always_ frees the statement. And if the statement is already finalized (due to an earlier error, perhaps) then it is a harmless noop. So you can do it near the end of your routine harmlessly.

Re: [sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-26 Thread Clemens Ladisch
Adam DeVita wrote: > As an error check, I've got a program opening an encrypted file. > > sqlite3_prepare_v2 returns SQLITE_OK > > and ppStmt is not null. > > When I run sqlite3_step(ppStmt) it returns SQLITE_NOTADB. sqlite3_prepare_v2 does not yet start a transaction (to allow keeping cached

[sqlite] statement prepares OK but step returns SQLITE_NOTADB

2012-10-26 Thread Adam DeVita
Good day, As an error check, I've got a program opening an encrypted file. sqlite3_prepare_v2 returns SQLITE_OK and ppStmt is not null. When I run sqlite3_step(ppStmt) it returns SQLITE_NOTADB. Recognizing an error at this point I'd like to clean up properly. sqlite3_finalize(ppStmt) returns