SQL Server 2008和C#2008的数据库连接 [英] Database connectivity for SQL server 2008 and c# 2008

查看:147
本文介绍了SQL Server 2008和C#2008的数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将C#项目与SQL-Server-2008连接时出现错误.错误是:

I have Error when I try to connect my C# project with SQL-Server-2008. Error 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 connection provider SQL Network Interface, error:26 Error Locating Server/ Instance Specified..


这很紧急,请帮助我..:confused:


It is urgent please help me..:confused:

推荐答案

能否给我连接字符串以了解您的问题?如果连接字符串是真的,这可能是sql服务器未正确安装的问题,或者您必须在sql服务器中更改某些配置.
can you give me connection string to understand your problem??if connection string is true it may be the problem the sql server not installed correctly or you must changes some configuration in sql server


请确保已指定正确的IP/服务器名称.
Make sure you have given the right IP / server name.


确保已在配置管理器中激活 TCP/IP .

[ SQL Server配置管理器]-> [ SQL Native Client xx.xx配置]->> [客户端协议]
TCP/IP 上右键单击,然后点击启用

也许这就是问题...;)
Make sure you have activated TCP/IP in the Configuration Manager.

[SQL Server Configuration Manager]->[SQL Native Client xx.xx Configuration]->[Client Protocol]
Right click on the TCP/IP and Enable

perhaps this is the issue... ;)


这篇关于SQL Server 2008和C#2008的数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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