My database contains a function that accepts as parameters a query name, and export spec, and a file path. The function then needs to export the query to the file path, using the export spec. But it just gives me the error "Cannot update. Database or object is read-only." Can anyone tell me why it does this?