> int sqlite3_prepare(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt > **ppStmt, const char **pzTail); > > Please tell me what the 4th parameter is then if it not a statement so that I > may ask you in the words you are looking for.
It's not a statement. Speaking in Igor's words it's a _pointer_ to statement. Speaking in Jay's words it's a _pointer_ to _pointer_ to statement structure. Usually when people say they have "function that is being passed an sqlite3_stmt object" they mean this prototype: void f(sqlite3_stmt* stmt); If you will check for NULL inside this function (as Jay suggested) and prepare statement if it's NULL then you will never have a non-NULL value there and memory will leak from you significantly. Pavel On Tue, Mar 9, 2010 at 1:07 PM, Ed Curren <ecur...@hotmail.com> wrote: > > According to the documentation the function prototype for sqlite3_prepare_v2 > is the following: > > > > int sqlite3_prepare(sqlite3 *db, const char *zSql, int nByte, sqlite3_stmt > **ppStmt, const char **pzTail); > > > > Please tell me what the 4th parameter is then if it not a statement so that I > may ask you in the words you are looking for. > >> To: sqlite-users@sqlite.org >> From: itandet...@mvps.org >> Date: Tue, 9 Mar 2010 13:03:00 -0500 >> Subject: Re: [sqlite] How can I query a sqlite3_stmt to find outif ithas >> been run through the sqlite3_prepare_v2 function? >> >> Ed Curren <ecur...@hotmail.com> wrote: >> > Okay, let's try asking the question this way then. How do I know if >> > I need to call prepare based on the condition or value or whatever of >> > a statement that may or may not have already been passed to perpare >> > as a parameter? >> >> You _cannot_ pass a statement to prepare as a parameter. >> >> Igor Tandetnik >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users