fix db error msg, and change truncate to delete because we dont have truncate priveledge