On 20 Jun 2010, at 10:17pm, Sam Carleton wrote:

> I am getting some strange behavior out of my app, which happens to be
> both an Apache module and some Axis2/C Web Services which run under
> Apache.  From time to time, it is VERY inconsistent, when the code
> calls sqlite3_close() the Apache server crashes.  I don't recall the
> error right off.

PLEASE write down the error message next time.

> From reading the documentation, it looks to me like sqlite3_close()
> should be called if *ppDb has a value, irregardless of the result code
> from the sqlite3_open_v2() call.  Is there more to it?

The ppDb value is about allocating memory.  It's possible that the file might 
be open and no memory allocated.  Or that memory was allocated and the file not 
opened.  I forget which.

Instead check the return value.  If you get SQLITE_OK then you need to close 
the connection.  If you don't, you don't.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to