how to solve this error ? and use detachdb?
back up all the files in .bitcoin.  then delete them all restart the wallet see if it errors.  If it does, re-download / re-install the client otherwise corupt configs.