数据库连接串错了
server=(local)\NetSDK;database=test;Trusted_Connection=yes

解决方案 »

  1.   

    looks fine, do you have a SQL Server instance "NetSDK"? does it allow you to use SQL Authentication? (if not, run Enterprise Manager, right click on the instance to open its Properties page and go to Security tab and select SQL and Windows authentication) do you have a database named "test" in this instance?
      

  2.   

    NetSDK是你在数据库里安装的实例,可以使用windows验证的信任连接
    server=(local)\NetSDK;database=test;Trusted_Connection=yes
      

  3.   

    改成:
    myConnection = New SQLConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=test")
      

  4.   

    System.Data.SqlClient.SqlException: SQL Server 不存在
      

  5.   

    >>System.Data.SqlClient.SqlException: SQL Server 不存在myConnection = New SQLConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=test")将其中的localhost换成你的SQL Server服务器的名称。
      

  6.   

    这个贴到底是谁发的?lwlmaomao () or  gracejty(原来什么都不懂)   ???!!!
      

  7.   

    那你的SQL Server到底存不存在呢?另外,应用服务器和数据库服务器在同一台机器时建议使用连接串为"Server=(local);Database=test;Integrated Security=SSPI"。印象里server=localhost是通过TCP/IP连接数据库实例而server=(local)是通过local named pipe连接,效率和安全性都比较好,不过抱歉实在记不确切了。