Is there something wrong or is there something missing from this sequence of SQLite actions? Note that all the return values are checked and are fine:
sqlite3_open_v2 sqlite3_create_function sqlite3_prepare16_v2 run in loop till SQLITE_DONE: sqlite3_step(lStatementHandle) sqlite3_step will run the callback function: Public Sub Sum2Longs(ByVal lPtr_ObjContext As Long, _ ByVal lArgCount As Long, _ ByVal lPtr_ObjSQLite3_Value As Long) sqlite3_result_int lPtr_ObjContext, _ sqlite3_value_int(MemLong(lPtr_ObjSQLite3_Value)) + _ sqlite3_value_int(MemLong(lPtr_ObjSQLite3_Value + 4)) End Sub MemLong is just a VB method to copy the pointers. RBS On Wed, Nov 4, 2015 at 7:42 PM, Richard Hipp <drh at sqlite.org> wrote: > On 11/4/15, Bart Smissaert <bart.smissaert at gmail.com> wrote: > > Been trying to get to the bottom of this, but no success. > > Note that with one UDF in the statement all runs perfectly fine. > > Could somebody confirm that they can run 2 UDF's (I have mainly tried > with > > the 2 the same UDF's) in the same SQL and that all > > runs as how it should? Just to make sure there is nothing wrong here with > > SQLite itself. > > > > SQLite does not really distinguish between application-defined > functions and built-in functions. They both work by exactly the same > mechanism. There are probably millions of SQLite queries with > multiple functions running at any given moment in time. > > There are probably thousands of test cases in the SQLite test suite of > queries that use two or more application-defined functions - real > application-defined functions, not built-ins. > > In particular, there are many many test cases of application-defined > functions doing hard things like invoking SQLite recursively. > > -- > D. Richard Hipp > drh at sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >