0
votes

I am using Windows 8.1 64 bit, Visual Studio 2012 and SQL Server 2012. When I try to add a SQL Server database to the mvc solution in Visual Studio, it gives me following error:

Connection to sql server database files require sql server 2005 express or sql server 2008 asp net

Any thoughts?

1
Because you don't connect to database. You creating database file, which is part of the project. And for that you need Express version.T.S.
@T.S. Thanks. But why do I need express version if I already have the regular version?Ivancao
Again. You said When I try to add a SQL Server Database to the mvc solution - you're adding db file to your project. DB file is different beast. Full version of Sql Server doesn't work with it. Check this out stackoverflow.com/questions/5446316/…T.S.
The ability to have "free-floating" .mdf that you connect to using AttachDbFileName=...... in your connection string in an Express-only feature. The proper solution is to create the database on the SQL Server and reference it only using it's logical name and stop fiddling around with .mdf files - let SQL SErver handle that ....marc_s
Unlike forum sites, we don't use "Thanks", or "Any help appreciated", or signatures on Stack Overflow. See "Should 'Hi', 'thanks,' taglines, and salutations be removed from posts?.John Saunders

1 Answers

1
votes

On 64-bit systems this error can be caused by 32/64 bit mismatch between Visual Studio and SQL Server Express. Microsoft published a fix regarding this issue, hope it helps:

http://support.microsoft.com/kb/957944