Make startdate YYYY010101 and exit on databaseerror
Exit on databaseerror.