Attempted update of read-only database
This error can obviously happen when you try to UPDATE some database which is marked read-only. It does not mean that the database file is read-only, but it contains a read-only mark. To change this, you can use the gfix tool.
gfix -mode read_only /path/to/database.fdb
gfix -mode read_write /path/to/database.fdb
This error can also show up when you only do SELECT statements, if the select involves a BLOB field that uses a different character set then the connection character set. In such case, Firebird tries to create a temporary copy BLOB in order to transliterate the data and it fails if database file is read-only.
Please note that many system tables have BLOB fields, so it is possible that your code never tries to do anything, but the code in your database access library might want to read some information from system tables and it might fail mysteriously. Since system tables store data in UNICODE_FSS character set, it is easy to test if this is the problem. Just change your connection character set to UNICODE_FSS and see if the problem would go away. (Since both character sets are the same, there would be no need for transliteration and temporary BLOB).