On Apr 3, 2008, at 5:09 PM, Joanne Pham wrote:
> Hi All,
> Should we always call sqlite3_finalize(pReadStmt); and  
> sqlite3_close(pDB) after we have done with read/write to database.  
> Or sqlite3_finalize(pReadStmt) is good enough.
> Please advice what is the sequence of statement that we should call  
> after we are done with database activities(read/write).

It is sufficient to call only sqlite3_finalize() and not  
sqlite3_close() in the
sense that your data will be written into the database file.  But  
until you
call sqlite3_close(), the database will remain open which uses some
memory and at least one file descriptor.  If you really are never  
going to
use the database again (or at least not soon) it is better to call
sqlite3_close() too.



D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to