Database read-write exception