简体   繁体   中英

How do i attach my local SQL server database?

Usually I do everything in visual studio but this time i want to create my database in management studio and then attach it in VS to use in my project.

I have SQL server 2012 express edition and VS2012 ultimate edition.

I have create a database in managemane studio called Breakspeare and when i try to attach it in VS (to try and create the connection string) i get an error.

I went into server explorer where my server is listed (local pc name) I click to add a new data connection and select microsoft sql server as the datasource, then in the server list i click on my server and in the database drop down it says something like "updating list" for around 30 seconds then comes back with "a network-related instance-specific error occurred while establishing a connection to sql server"

I checked that it is set to allow remote connections and it is, so whats going wrong?

原来我只是从服务器名称中缺少实例名称\\ SQLEXPRESS。

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