Here a sample (in c) of the use i would like to do with sqlite
   fucntion1() call fonction2() where is sqlite3_exec()
   Callback function is the function3() and i would like to add data
   in an array, which is retuned to function1() after the call of
   How i can do that ? does the Callback function can return
something else than an int ?

A callback function must return 0. Any non-zero return value is an error indicator.

However, the callback can, and usually does, have side effects. The void* parameter you pass to sqlite3_exec is passed through to the callback. Normally, this points to some kind of a data structure that the callback modifies.

Having said that, be aware that sqlite3_exec is retained for backward compatibility only. It is highly recommended for new code to use API like sqlite3_prepare, sqlite3_step, sqlite3_finalize, sqlite3_column_* to iterate over the resultset. In fact, sqlite3_exec itself is implemented entirely in terms of these public API functions.

Igor Tandetnik

To unsubscribe, send email to [EMAIL PROTECTED]

Reply via email to