我在 myconn.Open(); 行遇到错误 如何解决它。
{"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error:}
SqlConnection myconn = new SqlConnection();
String connection = "Data Source=SQLEXPRESS;AttachDbFilename=C:\\Users\\Winer\\Documents\\Visual Studio 2008\\WebSites1\\App_Data\\Database.mdf";
myconn.ConnectionString = connection;
myconn.Open();
任何人都可以说一下吗?