本文介绍了如何在VB.NET中连接到我的两个SQL Server版本之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的PC,2000和2012上安装了2个SQL Server版本,现在正尝试在2000版本上连接我的应用程序。为了支持使用MSSQL2000作为后端的旧系统,有必要使用它。我在连接字符串上使用了命名实例以及IP /端口地址,但由于找不到服务器,我仍然无法连接。任何能够指出我正确方向的人都将受到高度赞赏。在此先感谢:)



我的MSSQL 2012服务器:

Dim cn As SqlConnection = New SqlConnection(Data Source = CMSIMON \ MSSCT;初始目录= Northwind; User = sa;密码= August151984)



我的MSSQL 2000服务器:

Dim cn As SqlConnection =新的SqlConnection(数据源= CMSIMON \ MSSCT2000;初始目录= Northwind;用户= sa;密码= August151984)



2012工作正常,MSSQL 2000是没有。



我尝试了什么:



我使用了命名实例以及连接字符串上的IP /端口地址,但仍然无法连接,因为找不到服务器。

解决方案



Hi, I have installed 2 SQL Server versions on my PC, 2000 and 2012, and is now trying to connect my application on the 2000 one. It is necessary in order to support legacy systems still beiung used that uses MSSQL2000 as backend. I used named instance as well as IP/Port address on the connection string but still I cannot connect as the server was not found. Any one of you who can point me to the right direction would be highly appreciated. Thanks in advance :)

for my MSSQL 2012 Server:
Dim cn As SqlConnection = New SqlConnection("Data Source = CMSIMON\MSSCT; Initial Catalog = Northwind; User = sa; Password = August151984")

for my MSSQL 2000 Server:
Dim cn As SqlConnection = New SqlConnection("Data Source = CMSIMON\MSSCT2000; Initial Catalog = Northwind; User = sa; Password = August151984")

2012 works fine, MSSQL 2000 is not.

What I have tried:

I used named instance as well as IP/Port address on the connection string but still I cannot connect as the server was not found.

解决方案



这篇关于如何在VB.NET中连接到我的两个SQL Server版本之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 10:54