简体   繁体   中英

Creating Database in Visual Studio 2015

I am trying to create a database in Visual Studio 2015 MVC setup. When I create a new file in the "App_Data" folder and select SQL Server Database , a popup comes up that says the following:

"Connections to SQL Server database files (.mdf) require LocalDB or SQL Server Express to be installed and running on the local computer. You may need to modify the setup and ensure Microsoft SQL Server Data Tools is selected."

I have already installed SQL Express in my computer. But Visual Studio still shows the same popup. Can anyone please give me a step by step instruction on how to create a DB through Visual Studio 2015?

(My thought was if I clicked on new file->SQL server Database , then a popup would launch allowing me to input my data and name it. But I obviously am unable to do that).

Make sure that SQL Server is up and running. Open up SQL Server Management Studios (installed with SQL Server) and try and connect to the instance that you created (should be the same as your machine name). If it fails to connect, SQL Server might not be running.

To turn it on, open SQL Server Configuration Manager (just do a search and it'll show up), go to SQL Server Services, and turn on the database engine. You should then be able to connect to the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM