implemented database modification routines and added spass error codes