Retrieve the filerow in a thread safe way. Use SQLITE_OK as return value for success in this module to avoid confusion.