why I can't create SQL database in VS 2010?

2019-09-13 02:26发布

I want to create a SQL Server database in App_Data folder, but alert pops up saying:

Connections to SQL server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and runnin on the local computer

enter image description here

But I have this installed:

enter image description here

What's wrong with that? I need help:/

1条回答
smile是对你的礼貌
2楼-- · 2019-09-13 02:53

You need the SQL Server Express, not the normal (non-express) one.

Quoting this thread on MSDN social:

In particular, SSE has a number of options turned on that are typically not on in higher versions of SQL Server. You could turn them on but wouldn't want to if you are using SQL Server as a general server, not a local database store. In addition, there is some behavior that is unique to SSE that is particular to the way local database stores are used. But, to be quite clear, it is exactly the same .exe.

Have a look at this SO thread, too: Problem with creating .MDF file from Visual Studio 2010

查看更多
登录 后发表回答