SQL BOL says..
sp_attach_db should only be executed on databases that were previously detached from the database server using an explicit sp_detach_db operation.
If you have not detached the DB before getting mdf & ldf then attaching will not work.
Best Luck..
Nilesh