|
连接SQL server 2005 报错: [DBNETLIB][ConnectionOpen (Invalid Instance()).]
[DBNETLIB][ConnectionOpen (Invalid Instance()).]无效的连接。
刚开始以为是网络问题七改八改也不成 用SQL Server Management Studio Express就可以正常连接
还是问google吧,结果马上就搜出来了,说是改下连接字符串,以前写的是:
“Provider=SQLOLEDB.1;Persist Security Info=False;User ID=**;PWD=**;Initial Catalog=DatabaseName;Data Source=IP”
改成
“Provider=SQLOLEDB.1;Persist Security Info=False;User ID=**;PWD=**;Initial Catalog=DatabaseName;Data Source=IP,1433″
就是把”Data Sourse = IP” 改为”Data Sourse = IP,端口”,就连接正常 存起来 给自己提个醒吧
|
|