Hi all, I'm using sqlite3_create_function() to create an sql function, and in the implementation of the sql function calling sqlite3_result_error() and sqlite3_result_error_code().
The value set with sqlite3_result_error_code() immediately appears as the return code from sqlite3_step() and is available as the return value from sqlite3_errcode() as soon as sqlite3_step returns. which is good. The problem is the value set with sqlite3_result_error() is not retrievable using sqlite3_errmsg() until after sqlite3_finalize() or sqlite3_reset() is called. Here's an example : http://pastie.org/352677 download as text : http://pastie.org/352677.txt Output from when I run it: SQLite Version: 3.6.7 Writting error msg 'This is an error' and error_code 42 to context Return code from sqlite3_step : 42 Before finalizing error code is : 42 Before finalizing error message is : unknown error Return value from sqlite3_finalize : 42 After finalizing errcode is : 42 After finalizing error message is : This is an error Am I mistaken in thinking that the error message set in the implementation of an sql function should be available at the same time as the error code? Is this a bug? enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jer...@hinegardner.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users