SQLite Forum

C api sqlite3_db_readonly returns -1
Yes, i modified the second argument with the macro MAIN_SCHEMA as specified by Larry, and IT works for that line, the returned value is now 0 . I actually introduced that line of code to check if the database file is not writable, as a possible cause of segmentation fault crash. But this is not the case, the problem is somewhere else,  so i'll check 'non-sqlite' portion of the code .
Thanks a lot guys, i appreciate very much your answers.