今天下载了SQL Server 2005 Express和Visual Web Developer 2005 Express 来开发ASP.NET应用程序,数据库连接部分代码如下:
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "server=xiaozu/SQLEXPRESS;database=northwind;integrated security=yes";
conn.Open();出现异常:An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections。 后来我也配置了“开始-程序-Server 2005 -配置工具-外围应用配置七-服务和连接的外围配置-实例-远程连接-允许”,重起了机子,还是出现同样的错误!高手们分析一下是什么原因???
SqlConnection conn = new SqlConnection();
conn.ConnectionString = "server=xiaozu/SQLEXPRESS;database=northwind;integrated security=yes";
conn.Open();出现异常:An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections。 后来我也配置了“开始-程序-Server 2005 -配置工具-外围应用配置七-服务和连接的外围配置-实例-远程连接-允许”,重起了机子,还是出现同样的错误!高手们分析一下是什么原因???
http://support.microsoft.com/?kbid=914277&SD=tech
面且05好像还没有northwind数据库
http://support.microsoft.com/kb/914277/en-us