数据库中的错误消息 [英] error message in data base

查看:52
本文介绍了数据库中的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在visual studio .net中有数据库,我在其中工作,但突然间它永远不会工作和打开,它会发生什么以及它如何再次工作



浏览器中出现错误消息(建立与SQL Server的连接时发生与网络相关或特定于实例的错误。未找到服务器或无法访问服务器。验证实例名称是否正确以及SQL Server是否配置为允许远程连接。(提供程序:共享内存提供程序,错误:40 - 无法打开与SQL Server的连接))

I have database in visual studio .net , i work in it but suddenly it never work and open , what is happen in it and how it work again

th error message appear in browser is ( 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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) )

推荐答案

您需要修复连接字符串或确保服务器已开启。该错误意味着代码由于某种原因无法连接到您的数据库。
You need to fix your connection string or make sure the server is turned on. The error means that the code cannot connect to your database for some reason.


检查您的连接字符串:它是否已更改,或者是另一端的更改?



然后,如果看起来没问题,请尝试在VS中使用服务器资源管理器窗格设置连接:

1)打开服务器资源管理器。

2)右键单击数据连接并选择添加连接

3)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接按钮。

4)连接工作时,按确定

5)在服务器资源管理器窗格中突出显示数据库,然后查看属性窗格。将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。
Check your connection string: has it been changed, or is the change at the other end?

Then, if that looks OK, try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.


这篇关于数据库中的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆