LINQ问题 [英] LINQ ISSUE

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

问题描述

我用LINQ插入数据,将数据更新到数据库(SQL服务器),
它正在与我们的本地服务器一起工作,但是当我将其部署到客户端服务器....它停止工作.....
它给我一个错误
''建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接)''
一旦我更改为传统的add/edit(sqlcommand)...就可以了....但是我找不到问题所在?

请回答,如果有人对此有任何想法.... bcoz我几乎到处都用它来向数据库添加/编辑数据

预先感谢,
Sunita

I used LINQ to insert,update data to database(Sql server),
it is working fien with our local server,but as i deployed it to client server....it stopd working.....
it give me an error
''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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)''
as soon as i change to our traditional add/edit(sqlcommand)...it works fine....but i could not find what`s the problem???

plz reply,if anyone have any idea about it....bcoz i used it almost everywhere to add/edit data to database

Thanks in advance,
Sunita

推荐答案

好,我不是C#专家. :D根据错误我可以说你应该检查SQL Server配置.
Ok, I am not C# guru. :D depending on error I can say that you should check SQL server configuration.


我检查了SQL配置...现在.........以前,它工作正常..为什么????
i checked SQL configuration.......its the same n my issue is why it is giving error now.........erlier it was working fine..why??????


尝试验证您的sql server是否接受远程计算机或tcpip连接(来自SQL MConfiguration Manager)? :)
try to verify if you sql server accept remote machine or tcpip connection (from sql mconfiguration manager)? :)


这篇关于LINQ问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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