0

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?

5
  • 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. Commented Dec 18, 2014 at 3:30
  • @T.S. Thanks. But why do I need express version if I already have the regular version? Commented Dec 18, 2014 at 3:36
  • 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/… Commented Dec 18, 2014 at 4:17
  • 1
    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 .... Commented Dec 18, 2014 at 5:55
  • 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?. Commented Dec 18, 2014 at 5:57

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.