Jay Sprenkle wrote:
On 1/24/07, Jef Driesen <[EMAIL PROTECTED]> wrote:
Do I need to use sqlite3_close if the call to sqlite3_open indicated an
error? The documentation for sqlite3_open says "An sqlite3* handle is
returned in *ppDb, even if an error occurs." So I assumed the answer is
yes.
I never do, since if open fails I assumed the handle wasn't valid.
Almost never is still possible...
It almost never happens so the consequences of being wrong are pretty
small.
Did you look at the source for sqlite_open()?
I did. sqlite3_close is called automatically for SQLITE_NOMEM, but not for
other cases. So I guess sqlite3_close is still needed. But then it shouldn't
return an error, or am I wrong?
_________________________________________________________________
All things trendy for Windows Live Messenger ...
http://entertainment.msn.be/funwithmessenger
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------