我准备了一个使用Visual Basic 2010的程序,并且正在使用SQL数据库。 (基于服务的数据库)它正常工作。但有时(当我不使用电脑一段像2小时)我试着开始VB(F5)我的程序,它等待,然后给出了这样的错误:错误26在SQL服务器上
A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or is not accesible. Verify that the instance name is correct and that SQL Server name is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified.)
然而,重新启动我的电脑一个后或两次,没有错误:它运作良好。我用Google搜索了它,但没有任何帮助。恐怕这个错误在用户使用该程序时会成为问题。我该如何解决这个问题?
它是本地数据库还是另一台机器上的数据库? – jao 2011-06-10 19:28:05
您是否使用实体框架代码? – 2011-10-20 09:35:34