This is the command I used, I used the same for the mdf that worked.
sp_attach_single_file_db "test","c:\mssql7\data\test_data.mdf"
And this was the output
Server: Msg 945, Level 14, State 2, Line 1
Database 'test' cannot be opened because some of the files could not be activated.
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'test'. CREATE DATABASE is aborted.
Totally mystified.