SQLite Forum

Improve sqlite3_column_name() return value documentation
Login
> You can do a lot towards that using sqlite3_column_count().

As mentioned in other replies, both the column index and the statement pointer is valid. Let me rephrase:

Given valid arguments (valid statement pointer, valid column index) and a `NULL` response, can I be certain that the error was `sqlite3_malloc` failure? Based on the docs, I would conclude with "yes, given valid arguments and a NULL response, I've now got a memory error, so let's print 'memory error' to the user, and handle the error as an out-of-memory error". Based on the replies in this thread, I'm no longer certain about that.