Ok, I need a little help with the _bind* functions. Mostly I dont understand the arguments...

int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));

int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));

int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);

Whats n?  the size of the text?

The .h file says:
** When the eCopy parameter is true, a copy of the value is made into
** memory obtained and managed by SQLite.  When eCopy is false, SQLite
** assumes that the value is a constant and just stores a pointer to the
** value without making a copy.

But I dont know which arg is the eCopy param...

The API Ref says:
The fifth parameter to sqlite3_bind_blob(), sqlite3_bind_text(), and sqlite3_bind_text16() is a destructor used to dispose of the BLOB or text after SQLite has finished with it. If the fifth argument is the special value SQLITE_STATIC, then the library assumes that the information is in static, unmanaged space and does not need to be freed. If the fifth argument has the value SQLITE_TRANSIENT, then SQLite makes its on private copy of the data.


So, I'm guessing the fifth arg is the eCopy param? My C isnt very strong, so void(*)(void*) is a pointer to a function like this:
void* someFunc(void*), right?


My guess is the params are:

int sqlite3_bind_blob(sqlite3_stmt* statement, int paramNumber, const void* fieldValue, int fieldSize, callback); /*where callback can be one of the const's SQLITE_STATIC, SQLITE_TRANSIENT, or a pointer to a function that returns a void* and takes one void* as an arg. */

Correct?


Thanks

-Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to