-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick X wrote: > the above functions have me a little confused. So sqlite3_open, does > it returns a pointer to the open database or just the success or error > code or both.
The return code is an int which is the error code. The pointer referenced by the ppDb parameter is also changed to a sqlite3* allocated by SQLite. Note that ppDB is a pointer to a pointer, not just a pointer. > Second, if it returns a pointer to the open db is it needed to be > stored in memory to pass it to the close or other functions within > sqlite3. Yes, the sqlite* is used by several APIs and encapsulates access to a database. It is even allocated if there was an error as it includes the most recent error string. You always have to pass it to sqlite3_close as that is the function that does cleanup including all memory sqlite allocated. There is some sample code at the bottom of http://sqlite.org/quickstart.html The sample code uses sqlite3_exec to process the statements - you probably want to use sqlite3_prepare, step and finalize instead. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFyW1lmOOfHg372QQRAnzJAJ9R341pw1s08eKfy010kocZcMmSZwCgtr4n A19Swtye8MDXWz8FgHWOCRQ= =qg8K -----END PGP SIGNATURE----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

