Attaching Database - ASP.NET

Associate
Joined
25 Feb 2007
Posts
905
Location
Midlands
Hi,

I am developing my first web app in ASP.NET using Visual Studio 2010.

I need to attach an existing database I have which is sitting in an instance of SQL Server 2008. How would I do this? I have managed to create a DB using VS2010's built in instance of SQL Server, but I need to attach the database in my full install.

Thanks,
 
Cheers Spunkey,

I've found my MDF file, I get an error saying that the file is in use by another program. The only program I have open is Visual Studio.

Are there any SQL services/programs which may be stopping me from doing this?

Running Windows 7 x64 with VS2010 (32bit) and SQL Server 2008 (64bit), does the version mismatch make any difference?
 
@Spunkey - does the DB need to be offline then for my app to access it? No it's my own testing server, just learning at the minute :D

@Mickey - How would I do that? That sounds as though it might be what I need to do, as I think what I'm doing above is essentially copying the DB into my app? Correct me if I'm wrong, as I say I'm learning...
 
Back
Top Bottom