I have found my old 2008 database file (.mdf) and log file and I want this database to appear in my new installation of SQL Server 2012. Unfortunately I don't have a .bak file for the database - I only have the actual DB files themselves.
What I have tried to do so far is create a new database with the same name as my old one but in SQL 2012 and then deleted the new DB files and replaced them with my old database files. However SQL 2012 is not happy with this and when I go to look at the database in Management Studio it says "recovery pending" and the database is inaccessible.
Great, I am glad it worked!! Attaching a database may not always work correctly, if what I hear on the grapevine can be believed. In the future, if you want to move the database, rather than detaching and attaching, use backup/restore.