Change to use the correct DB in errormessage

Change to use the correct DB in errormessage