Thanks, that was it. I had done the encoding the same (but also tried 0), but the arguments were always set at 0. Now with the arguments the same as at registration it works fine. Maybe this should be added to the documentation of create_function.
RBS On Mon, Dec 19, 2016 at 7:03 AM, Dan Kennedy <[email protected]> wrote: > On 12/19/2016 03:32 AM, Bart Smissaert wrote: > >> Using the latest SQLite from VB6 and trying to unregister a UDF, created >> with sqlite3_create_function_v2. >> This registration works fine and the UDF's work fine. >> Now I am trying to unregister this UDF and the only hint how to do this >> that I could find >> was in the documentation of sqlite3_create_function_v2: >> >> To delete an existing SQL function or aggregate, pass NULL pointers for >>> >> all three function callbacks. >> >> I have tried this in VB6 like this: >> >> lRetVal = sqlite3_create_function_v2(ByVal lDBHdl, _ >> ByVal >> cConn.UTF8BytesPointerFromUTF16String(strFunctionName), _ >> ByVal 0, _ >> ByVal 0, _ >> ByVal 0, _ >> ByVal 0, _ >> ByVal 0, _ >> ByVal 0, _ >> ByVal 0) >> >> This seems to work in that lRetVal is zero, but I can still use the UDF in >> SQL. >> I know I could close the connection and re-register the remaining UDF's >> but >> that has drawbacks >> and seems unnecessary. >> >> Any suggestions how to do this? >> > > > Were the encoding and number-of-arguments (the third and fourth) arguments > passed to the two invocations of sqlite3_create_function_v2() the same? > > Dan. > > > > >> >> RBS >> _______________________________________________ >> sqlite-users mailing list >> [email protected] >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

