there could be no. of reasons for failure of database attachment
Like
1. mdf file is made in upgrated virsion than your sql server's version
e.g. database was created in 2008 and you are trying to attach in sql-2005
2. Login 'sa' have not enough rights/permissions to perform database attachment.
3. this Name is already exist in history of database names.
etc...
please describe error details if it is possible.
Happy Coding!
:)