表面上看没错。请确认你的SQLServer的服务是否已经启动?
在管理工具-〉服务中查看SQLSERVERAGENT服务是否启动。

解决方案 »

  1.   

    try
    {
        string strconn = "server=PC-200808301549;Initial Catalog=Northwind;Integrated Security=True"; 
            SqlConnection conn = new SqlConnection(strconn); 
    }
    catch(Exception ex)
    {
    Messagebox.show(ex.Message);
    }看看错误是什么不就知道了?
      

  2.   

    都不知道你是啥错,是连不上吗?连不上server=用IP看看
      

  3.   

    同意2楼的  你把server写成sql库的名字 不要用本地系统名!
      

  4.   

    string strconn = "server=PC-200808301549;Initial Catalog=Northwind;uid=sa;pwd=; "
      

  5.   

    string strconn = "datasource=(local);Initial Catalog=Northwind;Integrated Security=True"; 
    好像不支持sever的
    用datasource="sever的名字"
      

  6.   

    string strconn="server=.;uid=sa,pwd=sa;database=pubs";用这样的也可以。
      

  7.   

    string strconn="server=机器名\Sqlserver2005实例名;uid=sa,pwd=sa;database=pubs"; 
      

  8.   

    server 写ip 本地的写.或者(local)
      

  9.   

    可以.NET中的数据控件配置数据源,然后再一下,自动的生成的连接字符串(学习一下嘛)